users@glassfish.java.net

Re: Can I inject a JCA Connection Factory?

From: <glassfish_at_javadesktop.org>
Date: Wed, 10 Oct 2007 15:30:24 PDT

I don't think I can pass along my resource adapter, as you'd need instances of my server to connect to it, which you don't have access to. But, this is what is happening in my v2-ur1-b01 release.

I still think it's a pretty poor solution to depend on the logical name to determine whether or not it is a connector. I guess you can't always assume a connector will be a javax.resource.cci.ConnectionFactory. I'm assuming that, by the comments in the code, this is catering for a Connector whose type is a javax.sql.Datasource.

If nothing else, keep the check for the logical name (to support Connector's whose type is Datasource), but also see if the type is a ConnectionFactory. Then you only have to worry about documenting the "/eis/" naming approach for those Connectors that aren't providing Datasources/
[Message sent by forum member 'hildo' (hildo)]

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