[Opensource] dbconn pool disconnect
Michael Rimov
rimovm at centercomp.com
Mon Jan 20 10:25:59 PST 2003
At 12:53 PM 1/18/2003 -0800, you wrote:
>Pierre,
>
>sorry, I can't follow this in current code.
>
>larry
Hi Larry,
I fixed this about a week or so ago in CVS, that's why you couldn't find it :)
-Mike
>At 04:46 AM 1/6/2003, you wrote:
> >in DBConnectionPool line 384 and ... we find
> >
> > vecConnectionsToBeRemoved.addElement(new
> Integer(oneConnection.getId()));
> >
> > oneConnection.disconnect();
> > oneConnection.setAvailable(false);
> > }
> > } /* for each connection in the pool */
> >
> > /* Now iterate that vector and remove the connection
> objects from the hashmap
> > This is done to avoid the
> ConcurrentModificationException*/
> > if(bCheckToRemove){
> > for(int i=0; i<vecConnectionsToBeRemoved.size(); i++){
> > DBConnection dbconn =
> (DBConnection)vecConnectionsToBeRemoved.elementAt(i);
> > oneConnection.disconnect();
> > oneConnection.setAvailable(false);
> > inUse.remove(new Integer(oneConnection.getId()));
> > }
> >
> >You store connection to close as an Integer (its ID), but you retreive
> it as DBConnection : conclusion CastException.
> >Also, you disconnect and setAvailable(false) twice. I propose
> >
> > vecConnectionsToBeRemoved.addElement(oneConnection);
> > }
> > } /* for each connection in the pool */
> >
> > /* Now iterate that vector and remove the connection
> objects from the hashmap
> > This is done to avoid the
> ConcurrentModificationException*/
> > if(bCheckToRemove){
> > for(int i=0; i<vecConnectionsToBeRemoved.size(); i++){
> > DBConnection dbconn =
> (DBConnection)vecConnectionsToBeRemoved.elementAt(i);
> > oneConnection.disconnect();
> > oneConnection.setAvailable(false);
> > inUse.remove(new Integer(oneConnection.getId()));
> > }
> >
> >PMX
> >
> >
> >_______________________________________________
> >Opensource mailing list
> >Opensource at jcorporate.com
> >http://mail.jcorporate.com/mailman/listinfo/opensource
> >Archives: http://mail.jcorporate.com/pipermail/opensource/
>
>_______________________________________________
>Opensource mailing list
>Opensource at jcorporate.com
>http://mail.jcorporate.com/mailman/listinfo/opensource
>Archives: http://mail.jcorporate.com/pipermail/opensource/
More information about the Opensource
mailing list