7 Replies Latest reply on Dec 12, 2003 1:42 PM by juha

    Multiple instances of JBoss 3.2.2

    emiles

      Can someone send me a working sample-bindings.xml file to use with the ServiceBindingManager?

      I've recently downloaded version 3.2.2 and immediately tried to get 2 JBoss servers running at the same time using the SB Manager with no success. I assume that running multiple instances for multiple applications is common in a production environment, correct? In a previous post, someone mentioned that the SB Manager is not a highly sought feature. How else do you separate applications from one another? Do you deploy all apps to one server and use hot-deployment? Do all the apps on the same server share the same JVM? If so, doesn't this cause performance problems? Isn't it best to assign 1 JVM per app? Is there any JBoss "Best Practices" documentation out there concerning these questions?

      Thanks in advance.

        • 1. Re: Multiple instances of JBoss 3.2.2
          jonlee

          In having 1 JVM per application, you actually make worse use of resources. Since an application is supported by the J2EE infrastructure (JMS, JNDI, JBoss microkernel, etc) running two separate JVMs require the replication of these J2EE sub-systems in memory and in execution. Your J2EE environment is akin to an OS for your J2EE components. Your JVM encapsulates the J2EE environment, which is in turn encapsulated by your platform OS. You can and should run multiple J2EE applications (or components, depending on how distributed your application is) in the same JBoss instance on the one machine.

          For the same reason you don't run two operating systems simultaneously on the same machine, you normally wouldn't run two separate J2EE environments on the same system.

          Hope that explanation was not too confusing.

          • 2. Re: Multiple instances of JBoss 3.2.2
            emiles

            Not too confusing at all. Thanks for the explaination.

            How do you protect against apps that are resource hogs or problematic applications that require JBoss server restarts? Does the JMX microkernel protect you against this because you have atomic control of the container?

            • 3. Re: Multiple instances of JBoss 3.2.2

              No it doesn't. And AFAICR running with a VM security manager with more restrictions isn't fully tested either.

              So if you suspect you may have to host suspicious applications (that attempt DoS via infinite thread creation for example), then you should host one application per VM process.

              • 4. Re: Multiple instances of JBoss 3.2.2
                emiles

                In that case, can you send to me a working sample-bindings.xml file? The one included in the distro has not worked for me.

                Currently, I'm running JRun 4.0 and host 8-10 apps, each under their own server/JVM. The reason is I don't want suspicious apps crashing into non-suspicious apps and having to restart all apps when problems occur. I know this requires service duplication, more memory, etc., but memory is cheap these days. Granted, JRun is different than JBoss but things have worked well under these conditions. So, that's where I'm coming from when asking for multiple instances.

                I am using JBoss for development purposes because it seems to integerate better with other tools that I'm using such as Maven, XDoclet, Hibernate, etc.

                • 5. Re: Multiple instances of JBoss 3.2.2

                   

                  "emiles" wrote:
                  The one included in the distro has not worked for me.


                  What is not working?



                  • 6. Re: Multiple instances of JBoss 3.2.2
                    emiles

                    What I've done is this:
                    - fresh install (unzip) of jboss-3.2.2.zip
                    - uncomment ServiceBindingManager section in jboss-service.xml file for default server.
                    - configure ServiceBindingManager section to use the 'ports-default' configuration (I moved and renamed the sample-bindings.xml file to /jboss-3.2.2/server/port-bindings.xml).
                    - start jboss via /jboss-3.2.2/bin/run.sh

                    environment:
                    - Win2K
                    - java -version output:
                    java version "1.4.2_01"
                    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
                    Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)
                    - running jboss within cygwin.

                    exceptions are thrown in server.log file, starting with UIL problems.

                    Out-of-the-box, JBoss starts fine within cygwin without any exceptions.

                    • 7. Re: Multiple instances of JBoss 3.2.2

                      Post the exceptions and configuration changes you've made.