users@glassfish.java.net

Re: Can I inject a JCA Connection Factory?

From: <glassfish_at_javadesktop.org>
Date: Thu, 11 Oct 2007 00:00:50 PDT

The issue is not due to checking for isConnector().

http://docs.sun.com/source/819-0079/dgjndi.html
indicates that the recommended practice for connector resource is "eis/resource-name"

If the resource is not referred as "eis/..", it is assumed as unknown resource and a copy of the actual resource will be returned.
If it is "eis/..", copy of the resource is not created.

In my case, whether I use "eis/.." or "jca/.." or "foo", it works fine.

In your scenario where resource-ref name is not "eis/.." , while making an copy, you see Serializable Exception. It will be because the connection-factory (your RA's implementation of javax.resource.cci.ConnectionFactory) some how (closure of its references) has reference to BootStrapContext implementation of ApplicationServer which is not serializable. You need to find out the reference that is causing the problem.

Hope this helps.

Thanks,
-Jagadish
[Message sent by forum member 'jr158900' (jr158900)]

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