4 Replies Latest reply on Sep 5, 2002 2:44 PM by erikture

    Multiple system/database instances within one JBoss

    erikture

      Hello!

      I am developing a webpublishing system using jsp and ejb. I whant to deploy it using JBoss.

      I would like to be able to host several different websites on one computor. One website has its data stored in a database.

      My question is: Is it possible to host this within one single instance of JBoss or do I have to have one for each site?

      Each site is separate from each other, the do not have anything in common except that they are using the same system. No data charing between the sites are used.

      If it is possible how do I configure JBoss to get it to work? How do the ejbs know wich database to use? Do I have to deploy separate .ear files where the ejbs are bound to different names?

      /Erik

        • 1. Re: Multiple system/database instances within one JBoss
          joelvogt

          just to be clear you have an app.ear and you want to deploy multiple copies of this? Or do you have multiple .ear files?

          • 2. Re: Multiple system/database instances within one JBoss
            erikture

            Hello!

            I have one .ear file and want to deploy multiple separate copies of it.

            /Erik

            • 3. Re: Multiple system/database instances within one JBoss
              davidjencks

              (jboss 3 or 4)

              I'd suggest precompiling all your jsps, deploying all the classes from your entire app first, and then deploying an ear for each copy that contains only the deployment descriptors for the app, including the datasource deployments stuff. Remember that some things have to be unique accross the whole jboss server, such as jndi names and ejb names. (and mbean object names). If you have something like different pictures for each app copy I'm not sure how to handle them.

              • 4. Re: Multiple system/database instances within one JBoss
                erikture

                Hello!

                Thank you for your suggestion, but I do not think that will work.

                One feature I have is that it is possible to upload .jsp pages into the system while the system is running. So I can not precompile all of my jsp pages. The once that I know about is precompiled. The second problem is that I generate my deploymentdescriptors and also the getHome methods using XDoclet. So I can only have one JNDI name for each ejb.

                Is it possible in some way to tell a CMP bean wich database to look into on the fly. What I am thinking of is that if I could deploy my ear only once, but create several instances of my database tables within the same database server. Then I could tell the CMP bean which database to look into on the fly. It is possible for me to know which database I should look into if the CMP beans can be configured that way.

                It is OK for me to have only one instance of the .ear file. What is important is to have several instances of my database tables.

                If this is not possible I guess I will have to have several separate JBoss instances running on one computor, with several Jetty-servers listening on different ports?


                /Erik