[jboss-dev] [JBoss-dev] Multiple Instance of Web Application end Up Using Same JCA Resource

sjunejo sjunejo at temenos.com
Wed Jun 8 09:45:04 EDT 2011


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;
     
          ABC
          jca/abcConnectionFactory
          com.....ConnectionFactory
          Container
     
and corresponding jboss-web.xml has following mappings to bind above
resource to an actual JNDI;
    
        jca/abcConnectionFactory
        com.....ConnectionFactory
        java:jca/abcConnectionFactoryLIVE
    

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

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
-- 
View this message in context: http://old.nabble.com/Multiple-Instance-of-Web-Application-end-Up-Using-Same-JCA-Resource-tp31800776p31800776.html
Sent from the JBoss - Dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-development/attachments/20110608/af1a84a6/attachment.html 


More information about the jboss-development mailing list