Hi!
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:
public static void clearAllConns ()
{
Connection connCurrent = null;
if (iNumbOfConns > 0)
{
Enumeration enumConns = hashConns.elements ();
while (enumConns.hasMoreElements ())
{
try
{
connCurrent = ((Connection) enumConns.nextElement ());
connCurrent.rollback ();
connCurrent.close ();
}
catch (SQLException e) { e.printStackTrace (); }
}
hashConns.clear ();
iNumbOfConns = 0;
}
}
How correct to close all connections in this situation?
Thanks in advance!
Regards,
Vitaly ([EMAIL PROTECTED])
___________________________________________________________________________
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