tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Johnson-Evers <>
Subject RE: DBTags: When is preparedStatement 'prepared?'
Date Tue, 20 Nov 2001 19:12:19 GMT
I'd rather not get into another library at this point.

Could a "reuse" attribute be added to the preparedStatement tag that would
cause the setQuery(String) method to use an existing page context attribute
if found? I think I would like this approach (over DBCP) even if it meant I
need another carefully placed tag to close the prepared statement.


-----Original Message-----
From: Morgan Delagrange []
Sent: None
Subject: Re: DBTags: When is preparedStatement 'prepared?'

Unfortunately, you are correct.  Under ordinary circumstances, the
PreparedStatement will not be reused.  However, you may consider
implementing the database connection pool sponsored by the Jakarta Commons
subproject.  That DBCP provides optional pooling of prepared statements. 

- Morgan

Steve Johnson-Evers wrote on 11/13/01 3:46 pm:

I would like to have a preparedStatement nested inside a regular statement.
Will the prepared statement get reused and just take the new setColumn
value(s) or will database be asked to parse the inner statement for each row
the outer statement returns? I suspect the latter but I don't know how to
confirm my suspicions.


To unsubscribe, e-mail:
<> For additional
commands, e-mail: <>

Do You Yahoo!?
Get your free address at

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message