2 Replies Latest reply on May 1, 2006 10:07 PM by chrisbitmead

    multiple jbosses, keeps swapping databases

    chrisbitmead


      I'm using the port-bindings.xml method to have two jbosses running on the same machine. Each jboss talks to a different oracle database and has a different database in its XXX-ds.xml. However both use the same datasource names.

      If I start jboss instance "A" it talks to database "X". But now if I start jboss instance "B" (which is supposed to talk to database "Y", and access jboss instance "A", now instance "A" is talking to database "Y".

      In other words, starting off the second jboss instance seems to make the first jboss instance swap databases.

      Now, both jboss instances' datasources are named the same thing, but I wouldn't have thought they ought to conflict, but apparently they are. Surely I don't have to have different datasource names do I? The datasource names are hard coded into the application.

        • 1. Re: multiple jbosses, keeps swapping databases
          dimitris

          Something is probably wrong with your JNDI configuration. Any changed jndi.properties, or included with your application?

          • 2. Re: multiple jbosses, keeps swapping databases
            chrisbitmead

            No, nothing at all is changing in the app.

            I mean, I can start up the app, and it talks to Jboss "A" and database "X".

            Now I start up Jboss "B" which is configured for database "Y".

            Now while Jboss "B" is in the process of starting up, I start my app multiple times. I can start it up half a dozen times talking to the correct DB, but then after a minute obviously something in the start up process has screwed up, and maybe the 7th time I start the app, suddenly now it is talking to the wrong database. Nothing whatsoever has changed in the client app. Something is changing during the startup of the second JBoss.