4 Replies Latest reply on Mar 1, 2010 4:17 PM by Lee Boyajian

    JBoss AS and JVM usage.

    Lee Boyajian Newbie

      I have been looking for some answers concerning the following questions about JBoss and JVMs.

       

      1. By default, does JBoss run it's deployed Web Apps (WAR file) or EJB Apps (EAR file) in the same JVM that JBoss started in ?

       

      2. If so, is there a way to change this default behavior ? - i.e.: deploy two WARs in JBoss into two separate JVMs? Is it something having to do with the JBoss mbeanserver configuration?

       

      3. I would think that there is - if you consider the example of deploying the same app on the same machine more than once - each with different deployment settings. You would Not want both apps to share the same data ( maybe one is deployed as Dev and one as Test), so maybe you want them in separate JVMs.

       

      4. Are there any opinions as to the choices of running one deployed app per one application server vs. running multiple applications on one application server. I know the answer is probably application-specific - I'm looking for any general gotchyas.

       

      Thanks in advance........

        • 1. Re: JBoss AS and JVM usage.
          Peter Johnson Master

          1) Yes

          2) No (well, you could run multiple JBoss AS instances and deploy one app to each)

          3) Not sure what the question was here... But your assumption appears to be correct regarding separation of dev/test/production.

          4) With one app per app server you have the ability to configure each one to your liking, and there is the redued risk of conflicts, and if one app goes down it will not effect other apps. Usually having only one app per app server is a good idea for "significant" apps that have numerous users and get a lot of use. The down side is that each app server instance potentially uses a lot of memory.

          1 of 1 people found this helpful
          • 2. Re: JBoss AS and JVM usage.
            Lee Boyajian Newbie

            Thanks for your response Peter.

             

            I'm still  confused by your 'no' answer to question number two.

             

            I know a system admin ( not a JBoss Admin) who claims he can start different apps ( two WAR files for example) under one

            JBoss instance and each of these apps is run under a separate JVM and each is bound to separate ports. He says he does this

            by scripting the setting:

             

            JAVA_OPTS = $JAVA_OPTS -Djboss.platform.mbeanserver

             

            How can I prove or disprove that the app is running under a new JVM ?

             

             

            Thank You

            • 3. Re: JBoss AS and JVM usage.
              Peter Johnson Master

              The only thing that -Djboss.platform.mbeanserver does is tells JBoss AS to use the MBean server built into the JVM instead of using its own. This option is typically used so that you can access the MBeans via JConsole or similar tools. See:

              http://community.jboss.org/wiki/JBossMBeansInJConsole

               

              This option does not cause apps to be deployed into separate JVMs.

               

              You can bind different apps to different ports using virtual hosts:

              http://community.jboss.org/wiki/VirtualHostswithJBossAS

              But the apps are still running under the same JVM.

               

              You can tell how many JVMs are running by looking at the java processes (I could be more spcific if I knew the OS). Or you could use the jps utility that comes with the JDK.

              • 4. Re: JBoss AS and JVM usage.
                Lee Boyajian Newbie
                Thanks for your help........