Lin Gao created WFLY-6070:
-----------------------------
Summary: Can not deploy a @ConnectionFactoryDefinition if the RA has more
<connection-definitions>
Key: WFLY-6070
URL:
https://issues.jboss.org/browse/WFLY-6070
Project: WildFly
Issue Type: Bug
Components: JCA
Affects Versions: 10.0.0.CR5
Reporter: Lin Gao
Assignee: Lin Gao
Steps to reproduce:
* add a 2nd connection-defintion to
testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jca/deployment/ra.xml:
{noformat}
<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>
{noformat}
* 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)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)