Cedric,
Sorry, I was not clear enough in my response. I was referring to 2 calls to
'close' and 'connect' in a bean's method. Note: I did not remove the first
and last lines.
William Louth
Inprise
www.inprise.com/appserver
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Cedric Beust
Sent: Tuesday, September 05, 2000 2:25 PM
To: [EMAIL PROTECTED]
Subject: Re: Can I pass Connection object as a parameter to a Session
Bean .
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of William Louth
> If the code lised below is executed within a transaction could you tell me
> the benefit of closing the connection at line 3. I am assuming we are
still
> in the ejb server world. For a connection pooling mechanism to work
requires
> that the connection is in a valid state to service other client requests
> (another transaction) when returned to the pool.
Usually, you won't be dealing with connections directly but wrappers.
Closing
them will not close the physical connection, so it's good practice to
open/close them in each method and let the container figure out the best way
to pool them.
--
Cedric
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-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 EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".