Re: EJB and J2C Connector Problem

John Pickler <[email protected]> Wed, 27 Aug 2003 14:42:57 -0600
Newsgroups gmane.comp.java.sun.connector
Message-ID <[email protected]>
I'm not interpreting the spec to mean what your first sentence suggests.
The only thing I find in 5.5.4 that MIGHT go along with that is the
statement:

"[The ManagedConnection.cleanup] may be called after the end of a connection
sharing scope or when the last associated connection handle is closed for a
ManagedConnection instance."

I put the Connection.close() call in my ejbRemove() method and not in the
ejbCreate() method.  Also, I don't see that for a stateful session bean that
the end of ejbCreate() method would be the "end of a connection sharing
scope".  Are your comments referring to some other wording in the spec?

Thanks,
DW

----- Original Message -----
From: "Madhav Inamti" <[email protected]>
To: <[email protected]>
Sent: Wednesday, August 27, 2003 2:09 PM
Subject: Re: EJB and J2C Connector Problem


> The connector 1.0 spec says that ManagedConnection.cleanup to be called
(by
> the container) after a method call thus returning the ManagedConnection to
> the container pool. {spec. 5.5.4} However you can use
> matchManagedConnections in your ManagedConnectionFactory to identify the
> managed connection based on the data you have in your implementation of
> ConnectionRequestInfo interface.
>
> Hope this helps.
>
> Madhav Inamti
> Micro Focus Inc.
>
>
> -----Original Message-----
> From: John Pickler [mailto:[email protected]]
> Sent: Wednesday, August 27, 2003 11:30 AM
> To: [email protected]
> Subject: EJB and J2C Connector Problem
>
> I have a written a J2EE Connector Architecture 1.0 Resource Adapter for
> my company along with some sample customer applications.  I have several
> applications in which I need a stateful session bean to create a
> connection through my resource adapter, and then have the client be able
to
> call the methods on that EJB instance with that same connection.  The
reason
> they need to be the same connection is so that the work done on my ERP
> server (which is what my resource adapter talks to) will be recognized as
> one single, related user session on the ERP side.  However, I've done
> significant debugging in WebSphere 5.0.2 (my company's platform of
choice),
> and I am finding that although the connection is being created
> (by me) in the ejbCreate() method, the container is calling my
> ManagedConnection.cleanup() method after the ejbCreate() method is
finished,
> which of course terminates the connection.  I need this connection to stay
> live across multiple Interaction.execute() calls on my resource adapter.
> Any ideas on how I accomplish this?  Am I doing something wrong?
>
> Thanks,
> DW
>
>
===========================================================================
> 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".
>
>
===========================================================================
> 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".

===========================================================================
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".