Jens,

have a look at your exception handling, especially the try/catch block where you want 
to close the Database 
instance. If the commit() fails for one reason or another, your code to close the 
Database instance will neevr 
execute.

Imho, I'd move the commit() into the original try/catch block, as in (though 
simplified)

try {
  db.being();

  <your code>

  db.commit();
}
catch (Exception) {
}
finally {
  db.close();
}

IN addition, I'd consider to start using rollback() as well to maintain application 
data integrity. If you encounter any 
(persistence related) exception, you might want to (try to) rollback the transaction.

Regards
Werner

On Tue, 17 Jun 2003 19:55:32 +0200, Jens Saade wrote:

>Oops, I think I must revise my last comment. 
>
>It looks like it only takes some more time until the exception "
>java.sql.SQLException: Connection.close() has already been called.
>Invalid operation in this state."  occurs. 
>
>However I don't see anymore "org.exolab.castor.jdo.PersistenceException:
>This thread is already associated with a transaction in progress"
>exceptions.
>
>Resultsets are now closed in finally blocks - what about  the OQLQuery
>objects? Do they need to be closed aswell? 
>Whatelse could be a leak ?
>
>Jens
>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to