4 Replies Latest reply on Jul 2, 2004 6:04 AM by Oliver Henlich

    test & prod environments on same Jboss box

    jagertee Newbie


      What do you think seems to be the standard way of implementing different environments - e.g. test, demo, prod - of the same application where the client has limited hardware?

      This is where the web server part is most likely elsewhere (e.g. not part of Jboss) and Jboss is used as a middle tier EJB server, and there is (for example) only one box to run this on.

      Would you (a) code for this - for example prepending the JNDI name of the EJBs in the XML file with the environment name to identify them "test/myEJB" or "prod/myEJB" and parameterise the web system to call the appropriate one - OR (b) use multiple instances of Jboss (can each instance run different directories with diff JAR files? still to read up on this).

      What would be the best way to go - I'm sure this problem must have been encountered by many before. My concern with (a) above is the EJB class name referred to in the ejb-jar.xml - this would be to be different as well, or in a different package.

      What's the std approach?

      Thanks for the input

        • 1. Re: test & prod environments on same Jboss box
          Anil Saldanha Master

          Keep production seperate from unrelated installations. Dont' want to bring down prod by others.

          Maybe you can combine the test and demo instances into one.

          • 2. Re: test & prod environments on same Jboss box
            jagertee Newbie

            Thanks Janilsal

            Yes, I agree - separate prod from the others. Probably will be done, lets say they have 2 boxes for 3 systems (test, demo and prod). OK, like you say, combine test and demo. Same question applies - what's the method or approach people have made to solve this? Instances of JBOSS or code for it?

            I've tried to code, but it means changing package names in the .java classes (to ensure separate class file identifications referred to in the ejb-jar.xml) otherwise you get the same class even if different jndi names specified in the ejb-jar.xml. Rather not change the source.

            More input gladly accepted folks!

            • 3. Re: test & prod environments on same Jboss box
              Mike Finn Apprentice

              Don't code for it. It will be a nightmare maintaining separate names in JNDI for everything. Run multiple JBoss instances on a box. The config is very easy, using the binding service to manage listen ports. If you haven't yet, buy the admin/config guide. I think there is also a downloadable doc chapter on the binding service in the SF download area.


              • 4. Re: test & prod environments on same Jboss box
                Oliver Henlich Newbie

                another option you have is to multihome the box

                then start multiple jboss instances like so:

                1) jboss/bin/run.bat -b
                2) jboss/bin/run.bat -b

                now you have multiple jboss instances running on the same box
                but all using the same ports for their services (ie. the NamingService
                is always running on 1099).

                On my windows 2000 box it is fairly easy to define more
                than one IP adr for my one network card (network --> properties for you network card --> TCP/IP properties --> advanced )