tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morgan Delagrange <morg...@apache.org>
Subject Re: JDBC Statement tag: connection scope
Date Wed, 02 May 2001 17:21:38 GMT


On Wed, 2 May 2001, Brent Johnson wrote:

> The statement tag gets its connection as follows inside of doStartTag():
> Connection conn = (Connection)pageContext.getAttribute(_connId);
> 
> This means that the connection must be defined at PAGE_SCOPE.  This seems a bit restrictive.
 What if my connection isn't at page scope?  Is there a reason why the statement tag doesn't
use pageContext.findAttribute()? 

The <sql:connection> tags doesn't support assigning to another scope, so
that's the only real logic there.  I suppose it could use findAttribute,
but I don't really dig on people storing Connections at other
scopes.  That's what database pools are for.  :)

- Morgan


Mime
View raw message