Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-6038

Can not deploy a @ConnectionFactoryDefinition if the RA has more <connection-definitions>

    Details

      Description

      Steps to reproduce:

      • add a 2nd connection-defintion to testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jca/deployment/ra.xml:
                 <connection-definition>
                    <managedconnectionfactory-class>org.jboss.as.test.integration.jca.rar.MultipleManagedConnectionFactory2</managedconnectionfactory-class>
                    <connectionfactory-interface>org.jboss.as.test.integration.jca.rar.MultipleConnectionFactory2</connectionfactory-interface>
                    <connectionfactory-impl-class>org.jboss.as.test.integration.jca.rar.MultipleConnectionFactory2Impl</connectionfactory-impl-class>
                    <connection-interface>org.jboss.as.test.integration.jca.rar.MultipleConnection2</connection-interface>
                    <connection-impl-class>org.jboss.as.test.integration.jca.rar.MultipleConnection2Impl</connection-impl-class>
                 </connection-definition>
        
      • Run the WarServletDeploymentTestCase test
        => it fails because the ConnectionFactoryDefinition objects are no longer deployed.

      After debugging, the test fails because the deployed connection definitions are not activated.
      The code at org/jboss/as/connector/services/resourceadapters/ResourceAdapterActivatorService.java:232 is preventing the activation and looks suspicious.
      It expects that all the MCF in the RA (raMcfClasses) must all be in the activation (ijMcfClasses).
      With a 2nd <connection-definition> in the RA, it is no longer the case (as the activation only contains a single MCF (MultipleManagedConnectionFactory1).

      If I change the code so that it checks that all the MCF in the activations are in the RA, the test passes again.

      This issue is preventing me to reuse the code handling the @ConnectionFactoryDefinition to support the @JMSConnectionFactoryDefinition (my JMS RA defines 3 MCF for generic/queue/topic CFs but my activation only defines a single MCF per @JMSConnectionFactoryDefinition).

      I've not run it but the same issue is likely for admin objects too (the code in checkActivation is similar)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  gaol Lin Gao
                  Reporter:
                  jmesnil Jeff Mesnil
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: