Hi Guys,

Can anyone solve following;

when I am deploying multiple instances of my web application, each instance is configured to use different data source (JCA Cx Factory) definition but both are end up using same data source (whichever used first). Let me explain a bit, say I have two instance of same web application renamed as ABCLive and ABCTest.

ABCLive deployment descriptor (web.xml) contains following resource ref definition;
     <resource-ref id="ResourceRef_ABCConnectionFactory">
          <description>ABC</description>
          <res-ref-name>jca/abcConnectionFactory</res-ref-name>
          <res-type>com.....ConnectionFactory</res-type>
          <res-auth>Container</res-auth>
     </resource-ref>
and corresponding jboss-web.xml has following mappings to bind above resource to an actual JNDI;
    <resource-ref>
        <res-ref-name>jca/abcConnectionFactory</res-ref-name>
        <res-type>com.....ConnectionFactory</res-type>
        <jndi-name>java:jca/abcConnectionFactoryLIVE</jndi-name>
    </resource-ref>

In ABCTest deployment descriptor (web.xml) contains following resource ref definition (exactly same, as we do not have to edit this bit);
     <resource-ref id="ResourceRef_ABCConnectionFactory">
          <description>ABC</description>
          <res-ref-name>jca/abcConnectionFactory</res-ref-name>
          <res-type>com.....ConnectionFactory</res-type>
          <res-auth>Container</res-auth>
     </resource-ref>
and corresponding jboss-web.xml has following mappings to bind above resource to some other JNDI
     <resource-ref>
        <res-ref-name>jca/abcConnectionFactory</res-ref-name>
        <res-type>com.....ConnectionFactory</res-type>
        <jndi-name>java:jca/abcConnectionFactoryTEST</jndi-name>
    </resource-ref>

Now theoretically when I will access 'http://localhost:8080/ABCLive' instance it should use resource 'jca/abcConnectionFactoryLive' and for 'http://localhost:8080/ABCTest' instance it should use resource 'jca/abcConnectionFactoryTEST', BUT that's not the case, whichever I use first the other will use the same. For example, if I use ABCTest instance first, it successfully access 'jca/abcConnectionFactoryTEST' and now when I start using 'ABCLive' instance it also uses 'jca/abcConnectionFactoryTEST' which is incorrect, it should use 'jca/abcConnectionFactoryLIVE' and vice versa.

NOTE: I am using jBoss 5.1.0 GA release and IIRC the same setup used to work with jBoss 4.2.3GA.

Regards,

--

SJunejo
<br><hr align="left" width="300">
View this message in context: <a href="http://old.nabble.com/Multiple-Instance-of-Web-Application-end-Up-Using-Same-JCA-Resource-tp31800776p31800776.html">Multiple Instance of Web Application end Up Using Same JCA Resource</a><br>
Sent from the <a href="http://old.nabble.com/JBoss---Dev-f2633.html">JBoss - Dev mailing list archive</a> at Nabble.com.<br>