users@glassfish.java.net

Re: how to look up a resource adapter

From: <glassfish_at_javadesktop.org>
Date: Sun, 31 Aug 2008 11:17:23 PDT

Hi,

To implement createConnectionFactory([b]ConnectionManager[/b]), you only have to return a new instance of your connection factory class:
[code]
public Object createConnectionFactory(ConnectionManager cm)
        throws ResourceException {
{
      return new com.ra.ConnectionFactoryImpl(this, cm);
}
[/code]

I don't speak english and It's difficult for me to explain how to implement ALL mandatory interfaces. But for other implementation details, I would recommend you to download "J2EE Connector Architecture 1.0.1 Sample Source" from "http://java.sun.com/j2ee/sdk_1.3/".
(althought I haven't tried the sample with Glassfish, the "cciblackbox" adapter seems a good example for CCI).

You may also want to read these tutorials and examples:

CCI connector:
http://java.sun.com/developer/technicalArticles/J2EE/connectorclient/resourceadapter.html
(but it doesn't cover the "Interaction" interface).

DataSource connector:
http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-jca2.html

Custom interface connector:
http://www.oracle.com/technology/pub/articles/prabhu_jca.html
and the "mailconnector" JCA 1.5 adapter example from J2EE 1.4 Tutorial samples.


Good luck.
[Message sent by forum member 'jmarine' (jmarine)]

http://forums.java.net/jive/thread.jspa?messageID=296411