Simple ResourceAdapter and exception
curmi Jan 9, 2006 10:55 PMHi Guys,
I've very new to JBoss, and to J2EE. What I'm trying to do is build a very simple ResourceAdapter. I've done this, and run it, and it works fine - but I get an exception in JBoss. Hopefully someone can point out what to do here?
Basically I have a class MyResourceAdapter that extends ResouceAdapter. It has the expected methods (most do nothing), with some print statements in the start and stop methods. Nothing more complicated than this.
I build the rar file (myrar.rar). It has a ra.xml that has something like:
...
<vendor-name>Me</vendor-name>
<eis-type>MyProduct</eis-type>
<resourceadapter-version>1.0</resourceadapter-version>
<resourceadapter-class>mypackage.MyResourceAdapter</resourceadapter-class>
...
I deploy it with a myrar-ds.xml that looks like:
...
<connection-factories>
<tx-connection-factory>
<jndi-name>myproduct</jndi-name>
<rar-name>myrar.rar</rar-name>
</tx-connection-factory>
</connection-factories>
...
It runs fine, but gives an exception:
11:53:50,308 WARN [ServiceController] Problem starting service jboss.jca:name=jara,service=ManagedConnectionFactory
org.jboss.deployment.DeploymentException: couldn't get oldRarDeployment! jboss.jca:name='jara.rar',service=RARDeployment; - nested throwable: (org.jboss.deployment.DeploymentException: ConnectionDefinition 'null' not found in rar 'jara.rar')
at org.jboss.resource.connectionmanager.RARDeployment.startService(RARDeployment.java:544)
...
Now, I've tried adding:
<connection-definition>javax.resource.cci.ConnectionFactory</connection-definition>
to the -ds.xml file, which gives a different exception because there is no ConnectionFactory in my rar of course.
Does this mean I have to create one, even though I don't need one right now? I did experiment trying to create one and add it to my rar, and update the ra.xml to include <connectionfactory-interface> and <connectionfactory-impl-class>, but I still seemed to get an exception that it couldn't find ConnectionFactory.
Any ideas? At this point I just wanted to make the simplest ResourceAdapter out there, and have it work in JBoss.
Thanks for any help.