Have a look at the JBoss Manual Chapter 7 (there is an example for a simple file system adapter)
the sample adapters from SUN(tm).
I recommend avoiding the javaworld article. IMO it is full of errors.
A fairly complete adapter is the firebird jca-jdbc driver (sourceforge firebird project, cvs under client-java)
I found two examples in the web:
I agree with David - this example seems to contain some errors.
I was able to deploy this example on JBoss and for me it seems to be a easy to understand and complete JCA resource adapter example.
See also my posting in:
Can you please post the example from;
with your modifications for JBoss deployment.
It will be very helpful for me and others, I believe
I have modified the example and deployed on JBoss. The code for the RA as well as a Test Hello Bean application is attached.
It runs on JBoss-3.0.4 version.
Unfortunately I could not manage to deploy this on JBoss-4.0.4alpha builds. If anyone can accomplish this, please let us know (or knows how).
For jboss-head (jboss-4.0.0alpha) the attribute "JndiName" must be an attribute for the ManagedConnection.
So move line 21 to line 6 in your jboss-service.xml.
I had the same problem with my ressource adapter.
I have looked at the firebird adapter to investigate how it creates the services.xml file, but it doesn't seem to do anything but delete it from the deploy directory.
Is it possible to generate a services.xml file using xdoclet or do you always need to do it manually?
I don't understand what you are saying about firebird.
I recommend using jboss 3.2 or 4 and using *-ds.xml files.
Both *-ds.xml and *-service.xml files must be created manually.
Can you give me an xa transaction JCA adapter?
i want to connect jboss with websphere.
and i can't get http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/
how to get it??
i am in a hurry that i must complete it between 20 days!
Have attached a sample JCA app. Have tested it with
JBoss 3.2.0 w/ Tomcat 4.1.24 on Win2K using JDk 1.4
You would need to also have XDoclet installed.
Look @ bin/build.properties to set things up.
It's a non-transaction RA.
Let me know if you run into problems.
my jboss version is 4.00-alpha.
And i have downloaded the xdoclet.
but i don't know where is the property file of xdoclet that i must modify.example:ejb-version,jboss-version. and so on.
And what is the jca sample?
Will it conncect to a RDBS?
And how will i let it deal with a transaction ,and the transaction is a distributed transaction that bypass two jboss JVMS.
thanks your attention.
i know .Dose only rename the build.property to ant.property?
And where dose the jca-sample's src directory put ?
Could you give me the whole example that is deployed on your jboss and tested successfully?
I am trying the example in 3.2.1. I moved line 21 in jboss-service.xml to line 6. However I got the following exception, any ideas? - TIA
17:52:55,890 INFO [ServiceConfigurator] Problem configuring service jboss.jca:s
org.jboss.deployment.DeploymentException: Exception setting attribute javax.mana
gement.Attribute: name=ManagedConnectionFactoryName value=jboss.jca:service=NoTx
PF,name=propertiesfile on mbean jboss.jca:service=NoTxCM,name=propertiesfile; -
nested throwable: (javax.management.AttributeNotFoundException: Writable attribu
te 'ManagedConnectionFactoryName' not found)
I got it working - the ManagedConnectionFactoryName MBean should be moved inside the configuration of ManagedConnedtionPool. My jboss-service.xml is attached.