Hi,

We are designing our application as follows:

JSP -> Servlet [to retrieve the form data] -> DBHandle [For hadling
dbrequest ].

Once the user submits the form it will call a servlet which will have all
the form data.  My problem is that i need to maintain a CP and to give one
connection for each and every request to the DBHandle which will update the
database.  If my servlet is going to be only one then i would have my CP
initialized at the init() and can manipulate my poool, since i have lot of
servlets (one for adding user, one for adding a group etc.,) i am confused
where to create the pool.  I fear if i create the pool in the DBHandle class
then since each and every servlet is going to create a instance of DBHandle
there would be lot of connections, is that correct??.  If this is a bad
design where would be the best place to instantiante my CP and to create
pool.

Thanks for ur help,
Srini

-----Original Message-----
From: Khurram Saqlain [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 21, 2000 1:53 AM
To: [EMAIL PROTECTED]
Subject: application design


I'm designing our application which looks like:

JSP/HTML          (presentation layer)
-----------
Servlets          (Application layer)
----------
EJB               (DB Layer)


My question, how should I pass data retrieved from the database
as a EJB to the JSP layer? I could pass the EJB to the presentation
layer but is there a another alternative?

Is passing an EJB to the presentation layer a good approach
when the result set contains a large number of rows?

TIA,
Khurram

___________________________________________________________________________
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