Re: EJB and J2C Connector Problem
Jim Gish <[email protected]> Wed, 27 Aug 2003 19:00:01 -0400
| Newsgroups | gmane.comp.java.sun.connector |
|---|---|
| Message-ID | <[email protected]> |
<html>
At 04:09 PM 8/27/2003, you wrote:<br>
<blockquote type=cite class=cite cite>The connector 1.0 spec says that
ManagedConnection.cleanup to be called (by<br>
the container) after a method call thus returning the ManagedConnection
to<br>
the container pool. {spec. 5.5.4} </blockquote><br><br>
Where exactly does it say that? The only thing that I have seem that
comes close to that is in the 1.5 spec where the adapter implements the
<font face="Courier, Courier" size=2>DissociatableManagedConnection</font><font face="Courier, Courier">
and the app server implements </font><font face="Courier, Courier" size=2>LazyAssociatableConnectionManager. This allows connection optimization of shared connections whereby the app server can disociate a connection handle <br>
</font>from its ManagedConnection at times such as method completion and the adapter can them re-associate a application-cached connection handle the next time it is used. <br><br>
However, 1.0 doesn't provide for this optimization and connection handles should not be invalidated as John is seeing. <br><br>
<blockquote type=cite class=cite cite>However you can use<br>
matchManagedConnections in your ManagedConnectionFactory to identify the<br>
managed connection based on the data you have in your implementation of<br>
ConnectionRequestInfo interface.<br><br>
Hope this helps.<br><br>
Madhav Inamti<br>
Micro Focus Inc.<br><br>
<br>
-----Original Message-----<br>
From: John Pickler [<a href="mailto:[email protected]" eudora="autourl">mailto:[email protected]</a>]<br>
Sent: Wednesday, August 27, 2003 11:30 AM<br>
To: [email protected]<br>
Subject: EJB and J2C Connector Problem<br><br>
I have a written a J2EE Connector Architecture 1.0 Resource Adapter for<br>
my company along with some sample customer applications. I have several<br>
applications in which I need a stateful session bean to create a<br>
connection through my resource adapter, and then have the client be able to<br>
call the methods on that EJB instance with that same connection. The reason<br>
they need to be the same connection is so that the work done on my ERP<br>
server (which is what my resource adapter talks to) will be recognized as<br>
one single, related user session on the ERP side. However, I've done<br>
significant debugging in WebSphere 5.0.2 (my company's platform of choice),<br>
and I am finding that although the connection is being created<br>
(by me) in the ejbCreate() method, the container is calling my<br>
ManagedConnection.cleanup() method after the ejbCreate() method is finished,<br>
which of course terminates the connection. I need this connection to stay<br>
live across multiple Interaction.execute() calls on my resource adapter.<br>
Any ideas on how I accomplish this? Am I doing something wrong?<br><br>
Thanks,<br>
DW<br><br>
===========================================================================<br>
To unsubscribe, send email to [email protected] and include in the body<br>
of the message "signoff CONNECTOR-INTEREST". For general help, send email<br>
to<br>
[email protected] and include in the body of the message "help".<br><br>
===========================================================================<br>
To unsubscribe, send email to [email protected] and include in the body<br>
of the message "signoff CONNECTOR-INTEREST". For general help, send email to<br>
[email protected] and include in the body of the message "help".</blockquote></html>
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff CONNECTOR-INTEREST". For general help, send email to
[email protected] and include in the body of the message "help".