[JBoss7] Resource Adapter in EAR
swoeste Nov 29, 2012 12:46 PMHey Guys,
I have nearly finished the migration of our applications from JBoss4 to JBoss7.
But there is one thing I would like to improve in our deployment.
Currently I have defined the resource adapters in the standalone.xml and everything works fine.
The only thing that I don't like is the archive tag:
<resource-adapter> <archive> central-2.8.0-I-5-SNAPSHOT.ear#fw.vfs.bl.vfs-rar.rar </archive>
As you could see, each time the version number is changed the configuration must be changed also.
Removing the version number from the ear is not an option for me/us.
1. Try:
So I tried to move the resource adapter definition back into the rar.
In our original JBoss4 resource adapter rar we have the following structure:
fw.vfs.bl.vfs-rar.rar
|-META-INF
| \-ra.xml
|- fw.vfs.bl.vfs-jca-2.0.2-I-5-SNAPSHOT.jar
\-vfs-rar-ds.xml
(I have added all xml files as attachment if somebody wants to have a deeper look)
If I deploy the (in JBoss4 well working) resource adapter I get an exception:
javax.naming.NameNotFoundException: jcr/de/zeb/control/vfs -- service jboss.naming.context.java.jboss.jcr.de.zeb.control.vfs
It seems that the resource adapter is not registered in the JBoss7 and so it could not be found.
2. Try
After some research here in the forum and on other sides I found "ironjacamar.xml" (also added as attachment) a thought that it could help me.
I created a new ironjacamar.xml based on the configuration I already made in the standalone.xml and modified the resource adapter.
fw.vfs.bl.vfs-rar.rar
|-META-INF
| \-ironjacamar.xml
\- fw.vfs.bl.vfs-jca-2.0.2-I-5-SNAPSHOT.jar
That changed a bit, it seems that the JBoss7 tries to deploy the resource adapter but it fails with an:
org.jboss.jca.common.api.validator.ValidateException: IJ010075: The resource adapter metadata must contain either an outbound or inbound configuration
I checked the ironjacamar_1_0.xsd but there is no option to define a resource as inbound/outbund.
Question
Is there any solution to have the resource adapter and its configuration in an EAR?
Alternative
Or could i avoid the whole problem by something like this:
<resource-adapter> <archive> central-*.ear#fw.vfs.bl.vfs-rar.rar </archive>
kind regards
Sebastian
-
vfs-rar-ds.xml 899 bytes
-
ra.xml 1.7 KB
-
ironjacamar.xml 1.3 KB