You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by David Wynter <da...@btclick.com> on 2002/01/31 14:58:52 UTC
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Finding out more about internal connection errors
Posted by Costas Stergiou <cs...@hq.acn.gr>.
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" <da...@btclick.com>
To: "Turbine-User" <tu...@jakarta.apache.org>
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:
<ma...@jakarta.apache.org>
> For additional commands, e-mail: <mailto:turbine-user-help@jakarta.apache.
org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>