hi, everyone,

i'm working with jdbc.  i am testing a servlet that retrieves information
from a database by hitting "reload" or "refresh" numerous times, in both
netscape and ie.  i've found that, given this scenario, two things happen:

1. some of the connections from my connection pool don't get properly
returned -- they get lost in limbo somewhere (this varies with the frequency
of reloads -- the fewer times i hit reload, the fewer connections get lost0

2. i sometimes get an internal server error (i'm running apache)

i am synchronizing the connection pool, so the connections shouldn't be
getting mixed up between sessions.  i don't know what other programming
error i might be making.

is this a jdbc flaw?  an apache flaw?

the only solution i can think of is to limit the frequency with which a
single session can request the same servlet, so i can prevent deliberate
refreshes that can lead to serious problems.  but i am not sure how -- if --
that can be done.

any suggestions would be very useful.

thanks in advance.

best,
paul







-----Original Message-----
From: Kapoor, Nishikant X [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 16, 1999 8:45 AM
To: [EMAIL PROTECTED]
Subject: Strange problem


Hi all

I have a html form with a "Report" button that invokes the servlet that
generates a report and presents it back to the user using 'freemarker'
template.
It all worked fine until I discovered (by accident) that if I open up two
instances of the browser and click on "Report" simultaneously (almost), one
of the two browser gets the report TWICE as long i.e. both reports
concatenated and the other browser gets a blank output.

I have tried following but the problem still persists -

 * Enclosed createReport() within synchronized(templateObj) like
   private boolean createReport()
   {
    synchronized (templateObj)
      {
         ...
         code to create report and populate freemarker stuff
         ...
      }
   }

 * defined createReport() as
   synchronized private boolean createReport()
   {
      ...
      code to create report and populate freemarker stuff
      ...
   }

Can anyone help, please.

I'm using Apache_1.3.6, JRun_2.3.1, Servlets_2.1 on RH_6.0.

Thanks
Nishi

___________________________________________________________________________
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

___________________________________________________________________________
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

Reply via email to