users@glassfish.java.net

Re: How to retrieve Connection object from the COnnectionFacotory

From: <glassfish_at_javadesktop.org>
Date: Thu, 04 Sep 2008 11:47:58 PDT

Hi,

I think the ClassCastException is an incorrect import for "Connection" class in your "com.tedia.ra.spi.ManagedConnectionImpl" source code.
You should import from "javax.resource.cci.Connection"
 (instead of "com.sun.corba.se.pept.transport.Connection").


The "RAR7099: The mcf being used to allocate the connection and the MCF in the
pool are not equal. " information message could be because you are loosing "mcf" reference in ConnectionFactory ? (can you add a trace message before cm.allocateConnection to verify that "mcf" is not null?)

That may also explain the other error "RAR5117 : Failed to obtain/create connection from connection pool [ myrapool7 ]. Reason : null exception" you got before.

I would also recommend you to restart application server after redeploying each RAR adapter version, or modifying connector connection pool/resource properties.

I hope it works for your adapter.
(if not, can you provide complete source code & connection pool properties & application server version number?)
[Message sent by forum member 'jmarine' (jmarine)]

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