Technically speaking you should call connection.close() to return the
connection to the pool, so it can be reused (or terminated if there's no
need for another pooled connection).
If you keep hanging on to a connection then you will probably use it in
the future, so it remains open.
However, some magical piece of logic somewhere along can actually close
the connection and re-open it when you attempt to use it. This is really
up to the JDBC provider, and in fact implemented inside the driver.
I can tell you that PostgreSQL 7.0 will do that and a connection will be
recycled internally if your session holds to it but never uses it. I
don't know about Oracle or Sybase.
If you are interested in looking at the actual source code to see how
it's done, I can point you to both the PostgreSQL driver and the
connection pool manager.
arkin
Sanjay Nambiar wrote:
>
> Greetings ...
> I had seen some postings on this earlier with some solutions provided by
> Assaf Arkin.One thing I wanted to know is how do you close connections after
> they have reached a maximum value during the peak period.Connection Time
> out's may not be suitable in my case as the user may hang on to a session
> for a time greater than what I have set.
> I would be grateful for some pointers from those who have implemented
> connection pooling
> Regards
> SANJAY Nambiar
> > Infosys
> PUNE DC
> > __________________________________________________
> > Powered by intellect. Driven by values.
> PH : 647420-21 EXTN : 2036 Mail Id [EMAIL PROTECTED][EMAIL PROTECTED]
> "Live out each day as if, it is the first day you have ever seen and the
> last day you would ever see....."
>
> ===========================================================================
> 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".
--
----------------------------------------------------------------------
Assaf Arkin www.exoffice.com
CTO, Exoffice Technologies, Inc. www.exolab.org
===========================================================================
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".