[jboss-user] [IronJacamar] - Re: ManagedConnectionFactory Life Cycle
Jesper Pedersen
do-not-reply at jboss.com
Fri Aug 5 09:03:49 EDT 2011
Jesper Pedersen [http://community.jboss.org/people/jesper.pedersen] created the discussion
"Re: ManagedConnectionFactory Life Cycle"
To view the discussion, visit: http://community.jboss.org/message/619638#619638
--------------------------------------------------------------
> When it is deployed the createConnectionFactory(ConnectionManager cm) is executed by default.
Of course - that is the way the ConnectionFactory is created, and bound into JNDI.
> I do some house keeping with help of ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
You should never use the thread context classloader. Use the classloader that defined your deployment:
ClassLoader cl = MyManagedConnectionFactory.class.getClassLoader();
> This method is again executed when i try to access the adapter using an ejb.
> Problem is initally at the time of loading the classloader is null. Later it has a value when called from ejb. Effectively my housekeeping fails.
Are you sure, that it is the same ConnectionFactory that you reference ? Post your ra.xml and <resource-adapter> subsystem. And what the EJB does...
And "housekeeping" sounds very scary to me... Post your code
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/619638#619638]
Start a new discussion in IronJacamar at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110805/984b90e5/attachment.html
More information about the jboss-user
mailing list