Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-3047

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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.0.0.ER4
    • Fix Version/s: 7.0.0.ER5
    • Component/s: JCA
    • Labels:
      None

      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:
                  gaol Lin Gao
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: