struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Graham" <dgraham1...@hotmail.com>
Subject RE: DBCP Pooling Example App?
Date Thu, 19 Sep 2002 14:35:16 GMT
Don't know about the JNDI issue but you don't have to set rs = null.  I 
assume rs is a ResultSet and most of the time you declare rs in a method so 
when the method exits, rs will be free to be garbage collected anyway.  It's 
useless to set it to null when it's about to go out of scope.  However, if 
you're hanging on to rs in an instance variable then you want to set it to 
null at an appropriate time.

ResultSets get closed automatically when their Statement gets closed so I 
normally just do stmt.close().

Dave


>From: "Matt Raible" <matt@raibledesigns.com>
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: <struts-user@jakarta.apache.org>
>Subject: RE: DBCP Pooling Example App?
>Date: Thu, 19 Sep 2002 08:22:03 -0600
>
>I downloaded it and none of the samples have JNDI example.  I've tried
>this setup (see below), and it didn't work for me. So now I'm looking
>for a more concrete example - some proof that it actually works ;-)
>
>http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
>-howto.html
>
>Also, I've heard recently that it's important to not only do rs.close(),
>but also rs = null, etc. for stmts and conns too.  Is this true?
>
>Thanks,
>
>Matt
>
>
> > -----Original Message-----
> > From: V. Cekvenich [mailto:vicc@users.sourceforge.net]
> > Sent: Thursday, September 19, 2002 6:11 AM
> > To: struts-user@jakarta.apache.org
> > Subject: Re: DBCP Pooling Example App?
> >
> >
> > I just asked similar question in commons. Download DBCP from
> > commons, it
> > comes with samples.
> > V.
> >
> > Matt Raible wrote:
> > > I am trying to migrate from using Tyrex 0.9.7
> > (EnabledDataSource) to
> > > DBCP in Tomcat 4.1.10.  I can get an initial connection,
> > but then it
> > > fails with the following issue:
> > >
> > >
> > http://www.mail-archive.com/tomcat-user%>
>40jakarta.apache.org/msg66220.
> > > ht
> > > ml
> > >
> > > Does anyone know where I can download a sample app to see where I'm
> > > going wrong?
> > >
> > > Thanks,
> > >
> > > Matt
> >
> >
> >
> >
>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
><mailto:struts-user-help@jakarta.apache.org>




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message