Search code examples
jbossjboss-eap-7

Better approach to multiple jboss instances


I need create 4 Applications running in different ports within JBOSS EAP 7.

  • APP A: Port 8080
  • APP B: Port 8081
  • APP C: Port 8082
  • APP B: Port 8083

I know that i need use port-offset in standalone.xml to configure it. But i need separate server.log and stop/start for each instance. So i have 2 solutions:

1) Copy entire jboss folder for each project. i.e: jbossA, jbossB ...

2) Create a instances folder in jboss folder a use server.base.dir argument, like this: -Djboss.server.base.dir=appA

Which is the usual choice to multiple jboss instances ?


Solution

    • We use different server base directories, eg:

      • standalone_appA
      • standalone_appB
      • standalone_appC
      • standalone_appD
    • We pass the -Djboss.server.base.dir argument to standalone.sh.
    • We have different standalone.xml for every app as they require different subsystems. If they are all the same for your case you can link them instead of copying.