-
1. Re: Porting legacy resource adapter from AS5 to AS7
jesper.pedersen Oct 24, 2011 11:51 AM (in response to drosowski)What does your resource-adapters subsystem configuration look like ?
-
2. Re: Porting legacy resource adapter from AS5 to AS7
drosowski Oct 24, 2011 12:01 PM (in response to jesper.pedersen)Here you go:
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"> <resource-adapters> <resource-adapter> <archive> legacy.rar </archive> <transaction-support> NoTransaction </transaction-support> <connection-definitions> <connection-definition class-name="com.mycom.connector.legacy.LegacyManagedConnectionFactory" jndi-name="java:/Myra" pool-name="MyraPool"/> </connection-definitions> </resource-adapter> </resource-adapters> </subsystem> -
3. Re: Porting legacy resource adapter from AS5 to AS7
jesper.pedersen Oct 24, 2011 12:11 PM (in response to drosowski)1 of 1 people found this helpfulThat looks correct.
What does the validator in the standalone IronJacamar distribution say (1.1.0.Alpha2) ? Alternative, you can configure the <archive-validator> element in the jca subsystem.
-
4. Re: Porting legacy resource adapter from AS5 to AS7
drosowski Oct 25, 2011 3:05 AM (in response to jesper.pedersen)Hi Jesper,
first of all thanks for the info about the validator, this might come in handy.
This time though it gives me a "Validation successful" when running over my legacy.rar file.
-
5. Re: Porting legacy resource adapter from AS5 to AS7
drosowski Oct 25, 2011 3:35 AM (in response to drosowski)Oh, I just noticed the legacy.rar.log file, which contains some errors:
Severity: ERROR
Section: 6.5.3.2
Description: A ManagedConnectionFactory must implement a "public int hashCode()" method.
Code: com.mycom.connector.legacy.LegacyManagedConnectionFactory
Severity: ERROR
Section: 6.5.3.2
Description: A ManagedConnectionFactory must implement a "public boolean equals(Object)" method.
Code: com.mycom.connector.legacy.LegacyManagedConnectionFactory
Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a "public int hashCode()" method.
Code: com.mycom.connector.legacy.LegacyResourceAdapter
Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a "public boolean equals(Object)" method.
Code: com.mycom.connector.legacy.LegacyResourceAdapter
Well, I'll try to fix the errors and give feedback wether it worked or not.
Cheers,
Daniel
-
6. Re: Porting legacy resource adapter from AS5 to AS7
drosowski Oct 25, 2011 3:43 AM (in response to drosowski)Implementing the needed methods didn't help either. Validation succeeds and the log file remains empty, but JBoss still gives me the message IJ020013: Connection factory not bound.
I looked in the management console, but the resource adapter doesn't show up in neither "Container -> Naming" nor "Connector -> Resource Adapter", although I have it configured in standalone.xml.
-
7. Re: Porting legacy resource adapter from AS5 to AS7
drosowski Oct 25, 2011 7:46 AM (in response to drosowski)Hi Jesper,
I finally found out what caused the faulty deployment of my legacy RA. I grabbed the sources of ironjacamar and traced the deployment back to the AbstractResourceAdapterDeployer. It checks the connection factory if it implements Serializable and Referenceable. My legacy RA didn't implement these. Maybe a finer logging output would provide some insights (trace didn't tell me anything either). Thanks a lot for pointing me in the right direction!
Cheers,
Daniel
-
8. Re: Porting legacy resource adapter from AS5 to AS7
jesper.pedersen Oct 25, 2011 10:29 AM (in response to drosowski)Both issues (JBJCA-688 and JBJCA-689) resolved - they will be available in our next update to AS7.
Thanks for the feedback !