Re: close pooled conection-by value or by reference

2005-07-24 Thread Bertrand Renuart
If you want to make sure the connection is closed/release in any case, put the close() call inside a finally clause: Connection connection = DatabaseManager.getConnection(); try { //jdbc work. } finally { DatabaseManager.closeConnection(connection); } This way, whatever

close pooled conection-by value or by reference

2005-07-23 Thread Tony Smith
I think this is a classic java question: Pass by reference or by value. I have a DatabaseManager class which takes care of get conection from connection pool and release the connectoin. I am not sure about the release part. Here is my code: class MyMainClass public static final void

SV: close pooled conection-by value or by reference

2005-07-23 Thread Øyvind Johansen
Johansen ETC ElectricTimeCar -Opprinnelig melding- Fra: Tony Smith [mailto:[EMAIL PROTECTED] Sendt: 23. juli 2005 23:19 Til: Tomcat Users List Emne: close pooled conection-by value or by reference I think this is a classic java question: Pass by reference or by value. I have a DatabaseManager

Re: close pooled conection-by value or by reference

2005-07-23 Thread Philip Cote
connection.isClosed() should return a boolean telling you whether or not the connection was released. On Sat, 2005-07-23 at 14:18 -0700, Tony Smith wrote: I think this is a classic java question: Pass by reference or by value. I have a DatabaseManager class which takes care of get conection