tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Hall <>
Subject Re: [OT] how to over come toomanyconnection error when communicatingMYSQL
Date Fri, 11 Aug 2006 07:11:27 GMT
--- prakash shanmugam <> wrote:

> hai all,
> i have one major issue in my project..
> My project is developed using jsp,servlets in
> Tomcat5 with MySql as
> database.. i am using type1 driver
> My project is now used by end users in intranet..
> When multiple users are accessing at the same time
> ,its throwing too many
> connections exception at sometimes . And at
> sometimes its dispaying error as
> "Operation not allowed after ResultSet is closed"
> i dont know how to rectify this .. Can anybody help
> me to overcome this..


Your code has to be reworked to be usable.
As written, users are "stepping on one another"
in too many places to list.

You should take a look at a fairly robust
example and rewrite your code accordingly.

Guidelines: (see example)
 - Connection, Statement, ResultSet vars must
   have method scope
 - obtain, use, and close a Connection
   in a single method
 - after your application is successfully supporting
   multiple users look into using a Connection pool
   to improve performance



Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message