Hey!

I think this is an off-topic question for this E-list.  I will give you
my thoughts on the subject but I will keep it short.

I doubt that the connection broker is at fault here.

I'm guessing, but you may have poorly implemented the way you connect to
the DB in your servlet.  Without more details about your implementation,
I can recommend that you check this.

Take a 'view' of your servlet from afar.  If you are not using the MVC
model, and you have your connection to the DB inside your servlet make
sure that you get the DB connection just before you collect your data.
As soon as you get the data, close the connection or in your case send
the connection back to the broker.  The rule that I hold for myself is,
from the time that I open a connection to the time I release it (don't
need it anymore) is no more than 5-10 lines of code.

On the other hand, if you used the MVC model, then you probably would
not have this problem.  Your DB access would be in a helper class, it
would be called, and your connection would be released fast.

This is even more critical in applets.  If you have an applet that gets
a DB connection upon creation, you are sure to have this run away DB
connections problem.

Just guessing.  I may have totally misinterpreted your problem.

P.S. Please turn off you HTML for posting to this E-list.  Just use
text-only

Danny Rubis

A Suresh wrote:

> hi all,we 've developed a servlet application which has heavydatabase
> transactions and large number of simultaneoususers. we are using a
> database connection broker (dbConnectionBroker from
> www.javaexchange.com ).the application works fine when tested with few
> users...butthe database connections build up and the system
> crasheswhen more users start accessing the application.we would like
> to know whether this is because of the waythe connections are being
> handled, or it could be due tothe sessions or something else.we want
> your suggestions regarding database accessand handling large no of
> users using servlets...... thanks in
> adv,______________________________________________
> A Suresh
> [EMAIL PROTECTED]
> + 91 - 040 - 7896008 ( Ext. 4611 )

___________________________________________________________________________
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