--- prakash shanmugam <[EMAIL PROTECTED]> 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..

Prakash,

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

Example:
<http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/exercises/Example2/solution/Report4J.java>

-Bob
  

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to