The following code works fine (tested for months now):
DBConnection db = null;
Connection con = null;
try{
db = TurbineDB.getConnection();
con = db.getConnection();
//do something here
}catch(Exception sqle){
try{
db.close();
}catch(Exception ignore){};
}
finally{
try{
TurbineDB.releaseConnection(db);
}catch(Exception ignore){};
}
----- Original Message -----
From: "David Wynter" <[EMAIL PROTECTED]>
To: "Turbine-User" <[EMAIL PROTECTED]>
Sent: Thursday, January 31, 2002 3:58 PM
Subject: Finding out more about internal connection errors
> I am using 4 DBConnections for a task that runs from the TurbineScheduler.
I
> seem to get
> CLOSING DOWN CONNECTION DUE TO INTERNAL ERROR to stderr which I have found
> is associated with the TurbineDB.connectionErrorOccurred(). How do I find
> out more about why this is happening? I am using Oracle with classes12.jar
>
> I use
>
> TurbineDB.registerPool(poolname, Driver, DbURL, UserId,
> Password);
> dbConnI=TurbineDB.getConnection(poolname);
> dbConnI.setAutoCommit(false);
> dbConnO=TurbineDB.getConnection(poolname);
> dbConnO.setAutoCommit(false);
> dbConnU=TurbineDB.getConnection(poolname);
> dbConnU.setAutoCommit(false);
> dbConnD=TurbineDB.getConnection(poolname);
> dbConnD.setAutoCommit(false);
>
> To set the connections up.
>
> And then when I am finished I release them back to the pool with
>
> TurbineDB.releaseConnection(dbConnI);
> TurbineDB.releaseConnection(dbConnO);
> TurbineDB.releaseConnection(dbConnD);
> TurbineDB.releaseConnection(dbConnU);
>
> Do I need to close these connections first?
>
> Thanks
>
> David
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED].
org>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>