Two good answers. The IP alias is clever. I also asked this question on the JBoss forums and it turns out that there are alternate port bindings that you can invoke (the "rebase" option).
Start JBoss like this: run -Djboss.service.binding. Set=ports-01 Here's the link to the thread on the JBoss forums (cross-referenced to this thread): jboss.org/index.html?module=bb&op=viewto....
I don't know of the "rebase" option, but one simple approach is to set up an IP alias and specify the -b option of run. Sh to bind to that aliased interface. This is much easier than changing all the ports.
The ports can stay the same as long as each JBoss instance is bound to its own address. For example, $ sudo ip addr add dev lo local 127.0.0.100/24 $ run. Sh -b 127.0.0.1 $ run.Sh -b 127.0.0.100 $ wget 127.0.0.1:8080 $ wget 127.0.0.100:8080 Voila!
Two JBoss instances on one host.
There may be a canonical way to do this, but at work, we did this by inserting a replacement marker within the configuration files, which was scripted. You can probably find a list online of all the ports that you have to change. Once you do this, it's not too much trouble to set port non-overlapping port windows as you suggest.
Here's an example of the start command we were using (which could be further improved): run. Sh -c -DJPATH=/usr/local/bin:/usr/bin:/bin:/usr/local/jre1.6.0_03/bin/ -Djboss.bind. Address=192.168.110.21 \ -Djboss.port.
Connector=37079 -Djboss.port. Classloader=37080 -Djboss.port. Naming=37081 -Djboss.port.
Namingrmi=37082 -Djboss.port. Jmxrmi=37083 \ -Djboss.port. Pooled=37084 -Djboss.port.
Jndinaming=37085 -Djboss.port. Jndirmi=37086 -Djboss.port. Jms=37087 -Djboss.port.
Ajp=37078.
That's a bit of undertaking an old topic, but I've been asking asking myself the same question recently when migrating a Jboss AS 4 to 5 on our DMZ. Since I could not find any recent post about this, I thought I'd add my 2 cents in here. From the first answer I wrote those 2 sh scripts to have both Jboss4 and 5 running and logging in separate files : start-jboss4.Sh : #!
/bin/sh nohup /etc/jboss-4.2.3. GA/bin/run.Sh -b 10.0.0.51 > jboss4. Log & start-jboss5.
Sh : #! /bin/sh nohup /etc/jboss-5.1.0. GA/bin/run.
Sh -Djboss.service.binding. Set=ports-01 -b 10.0.0.51 >> jboss5. Log & But more importantly with this solution, I ended up asking myself how to stop one of these instances without droping the other one.
And this is where the 2 next scripts come to. Stop-jboss4. Sh : #!
/bin/sh /etc/jboss-4.2.3.GA/bin/shutdown. Sh -S -s jnp://10.0.0.51 stop-jboss5. Sh : #!
/bin/sh /etc/jboss-5.1.0. GA/bin/shutdown. Sh -S -s jnp://10.0.0.51:1199 Note that the first stop script uses JBoss' the default JNDI port.
But with the uprated ports the second start script brings, the second stop script uses 1199 (default + 100) as the JNDI port to use when sending the shutdown command. Hope this helps someone.
Note that the jboss.service.binding. Set property is only used by JBoss 5. So, if you want JBoss 4 on a different port profile you need to modify ${JBOSS_HOME}/server/default/conf/jboss-service.xml.
Look for the element referencing ServiceBindingManager and change the ServerName attribute. Ports-01 ${jboss.home. Url}/docs/examples/binding-manager/sample-bindings.
Xml org.jboss.services.binding. XMLServicesStoreFactory The port values used by JBoss 4 are read from ${JBOSS_HOME}/docs/examples/binding-manager/sample-bindings.xml. The default port profile names are as follows: ports-default ports-01 ports-02 ports-03.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.