On Thu, 3 May 2001, Brent Johnson wrote:

> 
>  In the documentation under 'closing connections' it says "unless you're
> performing your own connection pooling, always close your connection." Well,
> I am performing my own pooling and I would like to set up two connections
> (to different DBs) at the beginning of a request, but I can't put them at
> REQUEST_SCOPE because the statement tags won't find them.

Fair enough.  I'm changing statement to use the findAttribute method for
Connections, unless another developer has an issue.

Brent, you'll have to bear with us for probably a couple of days.  The
site is probably undergoing some changes this week, including a name
change for the JDBC taglib.  This may temporarily disrupt the daily build
for this taglib.

> A side note, the example in the documentation shows 'id' rather than 'conn'
> in the sql:closeConnection tag which is incorrect.

Good catch.  Fixed.

> 
> ----- Original Message -----
> From: "Morgan Delagrange" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, May 02, 2001 1:21 PM
> Subject: Re: JDBC Statement tag: connection scope
> 
> 
> >
> >
> > 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
> >
> >
> 
> 

Reply via email to