JBoss Community

Re: JCA Adapter & Recovery

created by Ant Kutschera in IronJacamar - View the full discussion

Yes, the adapter conforms to section 6.5.3.5 of the JCA spec.  See https://github.com/maxant/share/blob/master/resourceadapterdemo/SAPConnector/connectorModule/ch/maxant/jca_demo/sapresourceadapter/SAPManagedConnection.scala and lines 67-71 of https://github.com/maxant/share/blob/master/resourceadapterdemo/SAPConnector/connectorModule/ch/maxant/jca_demo/sapresourceadapter/SAPManagedConnectionFactory.scala

 

 

During deployment it logs (near the end of the line) that transaction support is XATransaction (presubably taken from the annotation):

 

 

22:04:18,448 DEBUG [org.jboss.as.connector.deployment] (MSC service thread 1-5) ParsedRaDeploymentProcessor: CMD=<?xml version="1.0" encoding="UTF-8"?><connector version="1.6" metadata-complete="false"><module-name></module-name><vendor-name></vendor-name><eis-type></eis-type><license><license-required>false</license-required></license><resourceadapter><resourceadapter-class>ch.maxant.jca_demo.sapresourceadapter.SAPResourceAdapter</resourceadapter-class><config-property><config-property-name>url</config-property-name><config-property-type>java.lang.String</config-property-type><config-property-value>http://localhost:8080/SAPService</config-property-value><config-property-ignore>false</config-property-ignore><config-property-supports-dynamic-updates>true</config-property-supports-dynamic-updates><config-property-confidential>false</config-property-confidential></config-property><outbound-resourceadapter><connection-definition><managedconnectionfactory-class>ch.maxant.jca_demo.sapresourceadapter.SAPManagedConnectionFactory</managedconnectionfactory-class><connectionfactory-interface>ch.maxant.jca_demo.sapresourceadapter.SAPConnectionFactory</connectionfactory-interface><connectionfactory-impl-class>ch.maxant.jca_demo.sapresourceadapter.SAPConnectionFactoryImpl</connectionfactory-impl-class><connection-interface>ch.maxant.jca_demo.sapresourceadapter.SAPConnection</connection-interface><connection-impl-class>ch.maxant.jca_demo.sapresourceadapter.SAPConnectionImpl</connection-impl-class></connection-definition><transaction-support>XATransaction</transaction-support><reauthentication-support>false</reauthentication-support></outbound-resourceadapter><inbound-resourceadapter><messageadapter></messageadapter></inbound-resourceadapter></resourceadapter></connector>

 

 

22:04:18,551 TRACE [org.jboss.as.connector.deployers.RADeployer] (MSC service thread 1-5) ResourceAdapter defined in classloader: ModuleClassLoader for Module "deployment.SAPTest.ear.SAPConnector.rar:main" from Service Module Loader

 

 

 

 

Then a little later it parses the ironjacamar.xml, where there is a recovery tag (containing a recover-plugin, that I was trying out):

 

 

 

 

22:04:18,557 DEBUG [org.jboss.as.connector.deployers.RADeployer] (MSC service thread 1-5) Activating: <connection-definition class-name="ch.maxant.jca_demo.sapresourceadapter.SAPManagedConnectionFactory" jndi-name="java:/eis/SAPResourceAdapter" enabled="true" use-java-context="true" use-ccm="true"><recovery no-recovery="false"><recover-plugin class-name="ch.maxant.jca_demo.sapresourceadapter.SAPResourceAdapter"></recover-plugin></recovery></connection-definition>

 

 

 

 

Then I get a warning from the RADeployer that there is a missing recovery element:

 

 

22:04:18,563 TRACE [org.jboss.as.connector.deployers.RADeployer] (MSC service thread 1-5) ConnectionFactory defined in classloader: ModuleClassLoader for Module "deployment.SAPTest.ear.SAPConnector.rar:main" from Service Module Loader

22:04:18,563 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-5) JBAS010406: Registered connection factory java:/eis/SAPResourceAdapter

22:04:18,587 WARN  [org.jboss.as.connector.deployers.RADeployer] (MSC service thread 1-5) IJ020016: Missing <recovery> element. XA recovery disabled for: java:/eis/SAPResourceAdapter

 

 

 

 

It goes on to successfully deploy the adapter, so I can use it, but clearly, XA recovery is disabled.  I searched the sources and class files that I have but couldn't find the IJ020016 message.  I also couldn't find a recovery tag in the ra.xml schema definition.  Which recovery tag is it referring to?  The ironjacamar.xml file contains a recovery tag - is it correct?

 

 

Thanks,

Ant

Reply to this message by going to Community

Start a new discussion in IronJacamar at Community