JCA RAR included impl jar dependency in a war won't work
dvsridhar Mar 21, 2013 7:20 PMI have resource adapter (ironjackamar) that is externally deployed (not with an ear). We have war that access the connection object using the rar and the connection type class is located in resource adapter impl jar which is bundled as part of the rar. I tried several ways but none of them seems to be working. The only way it works, if I include the war with in the ear, unfortunately we don't want to create ear's unless it required.
My question is do I need to have a dummy ear make this dependecy work? Any idea why the war alone depenendy doesn't work.
Approaches that didn't work with war deployment.
-------------------------------------------------------------------------
Caused by: java.lang.NoClassDefFoundError: com/cgi/cml/common/momapi/connector/ra/outbound/MomapiConnection
Approach1 : war: jboss-deployment-structure.xml
-----------------------------------------------------------------------
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
<module name="deployment.momentum-rest-web-1.0.war" >
<dependencies>
<module name="deployment.momentum-momapi-ra-1.0.rar"/>
</dependencies>
</module>
</jboss-deployment-structure>
Approach2 : war: jboss-deployment-structure.xml
-----------------------------------------------------------------------
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
<module name="deployment.momentum-rest-web-1.0.war.cml-momapi-rest-core-1.0.jar" >
<dependencies>
<module name="deployment.momentum-momapi-ra-1.0.rar"/>
</dependencies>
</module>
</jboss-deployment-structure>
Approach3 : war: jboss-deployment-structure.xml
-----------------------------------------------------------------------
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
<module name="deployment.momentum-rest-web-1.0.war.cml-momapi-rest-core-1.0.jar" >
<dependencies>
<module name="deployment.momentum-momapi-ra-1.0.rar.cml-momapi-ra-impl-1.0.jar"/>
</dependencies>
</module>
</jboss-deployment-structure>
The only way it works, provided if I define a dummy ear and include the following jboss-deployment-structure.xml
Working Approach : EAR: jboss-deployment-structure.xml
-----------------------------------------------------------------------
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
<sub-deployment name="momentum-rest-web-1.0.war">
<dependencies>
<module name="deployment.momentum-momapi-ra-1.0.rar" />
</dependencies>
</sub-deployment>
</jboss-deployment-structure>
Thanks
Sri