At 12:09 PM 5/5/99 -0400, you wrote:
>Hi,
>
>I would like to put several prepared statements where I think they
>belong, in the init section of my servlet. This would allow the
>statement to be prepared only once instead of every time a request comes
>in.
>
>Has anyone done this successfully? If so, how? If it can be done, do
>you then need a "prepared statement pool", similar to a connection pool
>to protect the threads?
>
>Thanks,
>John
>
A prepared statement is only valid on the connection it was prepared on.
If you do this each invocation of your servlet must use the same connection
used by init() (and probably synchronize it's use).
Regards,
Bob
___________________________________________________________________________
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