----- Original Message -----
Sent: Thursday, February 15, 2001 6:18
PM
Subject: RE: jdbc:leaked connection
The
problem can occur if you use code like:
try
{
Connection c = // .. aquire
connection
performOperation(c);
c.close();
}
catch (SQLException sqe) {
// report error
}
Because that means that your connection will not be closed
if:
1) You don't close it in the catch
clause
2) You get some kind of unchecked exception: i.e:
java.lang.RuntimeException
because any of those will return your function without the "c.close();"
having been run at all.
Instead use code like:
Connection c = null;
try {
c = // .. aquire
connection
performOperation(c);
} catch (SQLException sqle)
{
// report error
}
finally {
if (c != null) {
Can u ,please, tell me what is
this weird "leaked connection" in my code all my connection are
closed
I used the Djdbc.... but it is no
help
Has any of Orion users met this
before
thank u in advance
Orion/1.4.7 initialized
OrionCMTConnection
not closed, check your code!
LogicalDriverManagerXAConnection not closed,
check your code!
(Use -Djdbc.connection.debug=true to find out where the
leaked connection was cr
eated)