1 Reply Latest reply on Mar 21, 2013 10:38 AM by wdfink

    best practice when sharing JBoss between multiple instances?

    dpocock

      Can anybody comment on best practice for sharing a JBoss tree between multiple instances?

       

      Specifically,

       

      a) JBoss to be unpacked in a common location, e.g /opt/jboss-as-7.X

       

      b) all files under /opt/jboss-as-7.X to be read-only, unmodified original files from the distribution tarball (assume they are owned by root or on a true read-only filesystem)

       

      c) each `instance' will have a $JBOSS_HOME, for instance-specific config and dynamic content, for example,

           /usr/local/jboss/instance1

           /usr/local/jboss/instance2

       

      Various solutions come to mind, for example:

       

      In each $JBOSS_HOME, there would presumably be symlinks to static content, e.g.

       

        /usr/local/jboss/instance1/modules  ->  /opt/jboss-as-7.X/modules

       

      and there would be copies of things that are dynamic

       

         cp -R /opt/jboss-as-7.X/standalone /usr/local/jboss/instance1

       

      instances would be started with a custom RUN_CONF

       

        RUN_CONF=/usr/local/jboss/instance1/custom/standalone.conf \

        JBOSS_HOME=/usr/local/jboss/instance1 \

          /opt/jboss-as-7.X/bin/standalone.sh

       

      Looking inside standalone.sh, it appears possible to avoid any symlinks by using JBOSS_MODULEPATH, JBOSS_LOG_DIR, as well

       

      Can anyone comment on the recommended way to do this, or any best practices for such deployments?

        • 1. Re: best practice when sharing JBoss between multiple instances?
          wdfink

          you might use jboss.server.base.dir to divide the standalone directory to have a different deploy/data/log.

          the module directory I would share direct as the modules are loaded on demand and you can configure the version you need.

           

          But I would prefere the domain mode if I have several instance and try to share the common things and have one place for configuration.