Hi,

>Mike thanks for the feedback, but is this the practical solution? For
>example, I am using a connection pool, the init is only done once, the
>bean does the processing, after the processing it done (that is the
>beans "set" their properties) the results are forwarded to another jsp
>for viewing, so where do I release my connection back into the pool?

Your question is a good argument for having the bean retrieve the
connection, do its processing, and release the connection.  The results
you're forwarding can't be a java.sql.ResultSet, as that keeps the
connection open, but some other object containing the processed results.

Hand-in-hand with this approach goes the practice of getting a handle to
your connection pool in a ServletContextListener.  The listener can make
a getConnectionPool() or getConnection() method available for use by
your beans.  This approach has several advantages over the servlet init
(or jspInit for a JSP) design, all of which have been discussed in the
past on this list so if you're interested you can search the archives.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to