-
1. Re: Using old JCA adapter
weston.price Jun 2, 2006 7:43 PM (in response to ofrijole)There is a trick actually...not well documented for good reasons :-)
In your ra.xml you can put the following:
<resourceadapter-class>org.jboss.resource.deployment.DummyResourceAdapter</resourceadapter-class>
This will actually allow you to deploy the file. As a point of interest, this is actually how we deploy all of our JDBC adapters since they are 1.0.
Probably best to upgrade the code, shouldn't be much of a rewrite since outbound adapters are pretty straightforward...but this should get you started. -
2. Re: Using old JCA adapter
weston.price Jun 2, 2006 7:47 PM (in response to ofrijole)Note, the other thing you could do is leave out the version in your ra.xml file. We default this to 1.0 which forces the deployer to use the DummyClass. This would be in the case that you don't want to use the class directly.
I would venture a guess that the adapter might not be deploying for different reasons. Can you post a stacktrace? -
3. Re: Using old JCA adapter
ofrijole Jun 2, 2006 8:02 PM (in response to ofrijole)Actually, when I copy the .rar into the deploy directory ... nothing happened at all. It's almost like JBoss looks at the ra.xml and says ... I don't know what this is. But, there's no error ... I've not turned done anything to try to run in more verbose mode, though.
-
4. Re: Using old JCA adapter
ofrijole Jun 2, 2006 8:31 PM (in response to ofrijole)Well, now things are happening when I copy the .rar into the deploy directory. Not sure why they weren't before. In any case, I need to clarify which version of the dtd/xsd I should be using. My existing ra.xml has the following header:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE connector PUBLIC '-//Sun Microsystems, Inc.//DTD Connector 1.0//EN' 'http://java.sun.com/dtd/connector_1_0.dtd'>
Should I be using the following instead:
<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
version="1.5">
Is this version="1.5" what you said I could omit?
I've tried modifying my old 1.0 dtd based ra.xml to remove the <spec-version> tags and I've tried omitting the above version property from a 1.5xsd based version of the ra.xml.
With both versions of the ra.xml, I'm getting an error like the following:
17:20:52,485 ERROR [MainDeployer] Could not initialise deployment: file:/C:/Apps/jboss-4.0.4.GA/server/default/deploy/myadapter.rar
org.jboss.deployment.DeploymentException: Error parsing meta data jar:file:/C:/Apps/jboss-4.0.4.GA/server/default/tmp/deploy/tmp51507myadapter.rar!/META-INF/ra.xml -
5. Re: Using old JCA adapter
weston.price Jun 2, 2006 8:43 PM (in response to ofrijole)Sorry, I should have been more clear.
You can do one of the following:
In the
<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
version="1.5">
Section, you can either set this to "1.0" or just omit it all together. If you don't mind, could you post your ra.xml, just so I could have a look. -
6. Re: Using old JCA adapter
weston.price Jun 2, 2006 8:49 PM (in response to ofrijole)Sorry, I mispoke. You will have to convert your ra.xml file over to the 1.5 format.
If you look at any of the ra.xml files in the JBoss source tree:
connector
-->src
-->resources
-->local-*
-->xa-*
-->META-INF
-->ra.xml
You will see an example of how to do this.
Note, you have the option of using the DummyResourceAdapter, but you probably just want to write one of your own. The ResourceAdapter class doesn't really have to do anything beyond being included in the rar.
This is what we do with the DummyAdapter.
Sorry for the confusion. -
7. Re: Using old JCA adapter
ofrijole Jun 2, 2006 8:56 PM (in response to ofrijole)Cool, I finally got everything right and things are running! Thanks for your help. This means I get to go home tonight. ;-)
-
8. Re: Using old JCA adapter
weston.price Jun 2, 2006 9:41 PM (in response to ofrijole)Always a good thing :-)