Using JCA is the correct solution.
Use the code generator in IronJacamar distribution to get started - or download and build the latest source which contains a sample resource adapter (Hello World). Run "ant release".
See
http://www.jboss.org/ironjacamar/sourcecode
http://docs.jboss.org/ironjacamar/userguide/en/html/
http://docs.jboss.org/ironjacamar/developerguide/en/html/
for additional information.