Pergunta

At my office we run JBoss 4.0 and use Eclipse to debug and run the JBoss server. We're deploying simple wars, nothing terribly complex. However, I haven't yet figured out how to get this version of JBoss to either allow me to run separate instances of the war (HEAD and the Branch, for example) or to run separate servers controlled by two different projects in Eclipse. Anyone know how to do this? I've searched and found nothing that addresses this specifically.

Foi útil?

Solução

The three things you have to think about are:

  • Making sure that instances do not overwrite each other’s files
  • Making sure that the instances don’t open the same TCP ports
  • Determining how to shut down each instance

Create a copy of your configuration so you don't have file collisions (like when temp files are created). Then, I would recommend just binding the two configurations to different IPs on the same machine, which will avoid port conflicts. You can do something like this:

 run –b 192.168.0.100 –c myconfig
 run –b 192.168.0.101 –c myconfig2

If you have two network cards, this is easy. If you don't, you can setup virtual IP addresses with a loopback adapter on Windows. On Linux, you can use ifconfig.

To shut down, just make sure you specify the IP/port to shut down, like this:

shutdown –s 192.168.0.100:1099 -S
shutdown –s 192.168.0.101:1099 -S

I'm not sure how to get you going on Eclipse, but you should be able to specify those flags to the run and shutdown scripts through the configuration somehow.

We cover this topic in depth in JBoss in Action in section 15.2 - Collocating multiple application server instances.

Outras dicas

I think you can subscribe various instances of JBoss to your eclipse installation. normal installation example

Hope it helps you

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top