1 2 Previous Next 23 Replies Latest reply on Dec 9, 2003 9:28 AM by himesh

    creating multiple instances of jboss

    futureboss Newbie

      Hi
      I am trying to install jboss and it is succesful.
      My queries are
      1. I need detailed information of how to create multiple instances of jboss in the same m/c.
      2. What are the configurable parameters for an instance and how it can be changed?

      Can anyone help me in this regard?
      Thanks in advance

      perumal

        • 1. Re: creating multiple instances of jboss
          Adrian Brock Master

          There is a binding service that will help you.
          You might find details using search otherwise it is
          explained in the doco.

          Regards,
          Adrian

          • 2. Re: creating multiple instances of jboss
            futureboss Newbie

            Hi friend
            Thanks for your immediate reply. Actually i was referring to lot of documents.

            Does creating multiple JBoss instances means duplication of entire JBoss folder along with bin, client, docs, lib, server subfolder to jboss1, jboss2, jboss3... with different port number? Please clarify me in detail.
            (What is meant by binding service???)

            thanks & regards
            perumal

            • 3. Re: creating multiple instances of jboss
              Adrian Brock Master

              You duplicate the server folders to have
              jboss1, jboss2, etc alongside minimal, default, all

              The port changes are handled by the binding service,
              there is an example config in docs in 3.2.2RC1
              you specify which port config you want to use by
              providing its name in conf/jboss-service.xml in
              the binding service mbean (commented out by default).

              Regards,
              Adrian

              • 4. Re: creating multiple instances of jboss
                futureboss Newbie

                hi adren
                suppose i want to run jboss1 on port 8080 and jboss2 on port 9090, where should i change the port configuration? Pls clarify in detail.
                Does jboss-3.2.1 has binding support?

                regards
                perumal.

                • 5. Re: creating multiple instances of jboss
                  Adrian Brock Master

                  You change it in the binding-service.xml

                  jboss3.2.1 has support for the binding service, but I
                  think the jar is only in server/all/lib
                  Also, I don't think there is an example binding-service.xml
                  in docs?

                  Regards,
                  Adrian

                  • 6. Re: creating multiple instances of jboss
                    iwan_eising Newbie

                    I think you will need to change the port-numbers in two jboss-service.xml files:

                    - <JBOSS_HOME>\server\<the_server>\deploy\http-invoker.sar\META-INF
                    - <JBOSS_HOME>\server\<the_server>\deploy\jbossweb-tomcat.sar\META-INF

                    I think that should work, I'm not sure if it covers all, but for this seems to work. It works with my .war applications, and seems to work with my .ear applications as well.

                    Iwan

                    • 7. Re: creating multiple instances of jboss
                      iwan_eising Newbie

                      > I think you will need to change the port-numbers in
                      > two jboss-service.xml files:
                      >

                      I just found out this isn't enough to have multiple instances running concurrently. So I guess there's more to it. If somebody knows, please share.

                      Iwan

                      • 8. Re: creating multiple instances of jboss
                        leninkoduru Newbie

                         

                        "leninkoduru" wrote:
                        Yes u can have multiple instances of JBOSS.
                        The only thing u have to do is you have to change the port number in the following dorectory

                        <JBOSS_HOME>\server\<the_server>\deploy\http-invoker.sar\META-INF
                        - <JBOSS_HOME>\server\<the_server>\deploy\jbossweb-tomcat.sar\META-INF

                        I tries it it works fine for me.If you are still having problem please let me know.


                        • 9. Re: creating multiple instances of jboss
                          iwan_eising Newbie

                          I still get exceptions stating that addresses are already in use. This involves the naming-service and the webservice.

                          My guess is I need to change these as well, but that could be tricky, as naming services are usually expected to run on port 1099.

                          Any ideas?

                          Iwan

                          • 10. Re: creating multiple instances of jboss
                            Joshua Davis Expert

                            I have a similar problem: Multiple developers sharing a large UN*X box for runtime deployment. I solved the problem by having each developer create a configuration file that is processed by ANT to create a unique JBoss configuration, substituting the port numbers into the relavent files.



                            <!--
                            Copy the default server configuration files into the JBoss distribution into
                            the runtime directory. Do not copy the configurable files.
                            -->
                            Copying default configuration files from ...


                            <!-- Do not copy configurable files -->


                            <!-- Do not copy log and temp files -->





                            <!--
                            Substitute the port numbers, etc. while copying the configurable files into\
                            the runtime directory.
                            -->
                            Configuring ${runtime.configuration.dir}...


                            <!-- Naming / JBoss WebService ports are defined in this file. -->

                            <!-- HTTP / AJP ports are defined in this file -->



                            <!-- Configure based on properties defined in runtime.properties -->










                            • 11. Re: creating multiple instances of jboss
                              Bryan Ross Newbie

                              I have the service-binding working successfully in JBoss 3.2.1. I had to take the files from 3.2.2 RC1, but everything seems to work.

                              The files I took were sample-bindings.xml (I renamed to service-binding.xml) and bindingservice-plugin.jar.

                              Place the xml file somwhere in the jboss directory structure so that each configuration can reference it. I then copied the default directory to directories called 'instance1' and 'instance2' at the same level as 'default'. The result is a structure that has 'default', 'instance1', 'instance2' under the \server directory.

                              Then place the bindingservice-plugin.jar in the lib directory of each instance.

                              Edit the jboss-service.xml in each instance to uncomment the service binding mbean and referencing the xml file.


                              instance1
                              file:${jboss.server.base.dir}/service-bindings.xml
                              org.jboss.services.binding.XMLServicesStoreFactory


                              You should then be ready to start the jboss instances. From the bin directory 'run -c instance1'

                              I have attached my service-binding.xml as well.

                              • 12. Re: creating multiple instances of jboss
                                Andrea Giovannini Newbie

                                Hi everyone!!

                                Question: where does JBoss_Tomcat compile JSP pages?
                                In JBoss 3.0.3 & Tomcat 4.0.X it seems that pages compilation output goes to JBOSS_HOME\catalina\work\MainEngine\localhost\\
                                but what if I have multiple instances running different versions of the same webapp (with the same webapp name)???
                                I've noticed that stopping an instance cleans up the folder JBOSS_HOME\catalina\work\MainEngine\localhost\\ so other instances won't run anymore and I get JSP compilation errors because jasper can't find the jars of my app.

                                So my conclusion is that for multiple instances I need multiple catalina folders under the JBOSS_HOME folder, so I have
                                JBOSS_HOME
                                bin\
                                catalina-instance1\
                                catalina-instance2\
                                ...
                                server\
                                server\instance1\ where tomcat4-service.xml points to catalina-instance1
                                server\instance2\ where tomcat4-service.xml points to catalina-instance2

                                Is my analisys correct?
                                If so is the previous structure necessary also with the binding service?
                                If not can anybody give some more details (e.g. what about the folder JBOSS_HOME\server\\tmp??) ???

                                Thanks you very much in advance,
                                Andrea

                                • 13. Re: creating multiple instances of jboss
                                  Ed Newbie

                                  I have followed the steps you have taken and it does work with a few exceptions on instance2. However, another requriement I have is that each instance requires a different database connection. Initially with the "default deploy" I had my oracle connection defined in hsqldb-service.xml (the default database). My instance1 connects OK to the default connection but my instance2 gets a connection error and eventually I will need a different connection for instance2. Do you know of a simple solution so that each intance has its own database connection?

                                  • 14. Re: creating multiple instances of jboss
                                    Bryan Ross Newbie

                                    You can change the datasource information in each of the hsqldb-service.xml files in each instance. I do the same thing with SQL Server, DB2 and Oracle. Each instance can have it's own datasource definitions (*-ds.xml).

                                    What exceptions are you getting with the second instance?

                                    1 2 Previous Next