Vitaly Yermolenko <[EMAIL PROTECTED]> wrote:
> I am using servlets with Oracle & JDBC thin driver. And every time
after successully connection with DB when I close the browser by Exit or [X]
key the correspondent Oracle process is not down and after some time occur
error:
>
>java.sql.SQLException: ORA-00020: maximum number of processes (50) exceeded
>
> I use the next construction in destroy() method of servlets:
The destroy() method does not get called when the user exits the browser. It
gets called when the servlet is unloaded, which can happen when the server
shuts down, or maybe some servlet engines will unload servlets after a
period of inactivity.
As is mentioned here every week or so, there is no way to know if the user
has exited the browser.
Perhaps you can close your database connections as soon as you have returned
a result to the user, or after some timeout period. If you want to keep the
connection open because you have more data to show the user, consider saving
all the data to a cache and closing the database connection.
Opening and closing database connections is relatively expensive. A
connection pool can help speed things up. Check the PurpleTech servlet FAQ
for more info.
Erik
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html