Subject | Re: Illegal exceptione |
---|---|
Author | rrokytskyy |
Post date | 2002-08-10T08:51:30Z |
Hi,
finishing transaction with connection.commit() or
connection.rollback(). I could not find in JDBC specification that
connection is either committed or rolled back implicitly when it is
closed, only "When auto-commit is disabled, each transaction must be
explicitly commited by
calling the Connection method commit or else explicitly rolled back by
calling the Connection method rollback." (JDBC 3.0 spec, page 62).
So, you need to check your code if you commit or rollback before
returning the connection to the pool.
Best regards,
Roman Rokytskyy
> java.lang.IllegalStateException : Can't destroy managed connection withIn general this means that connection.close() was called without
> active transaction.
>
> Does anyone know about my problem and solution ?
finishing transaction with connection.commit() or
connection.rollback(). I could not find in JDBC specification that
connection is either committed or rolled back implicitly when it is
closed, only "When auto-commit is disabled, each transaction must be
explicitly commited by
calling the Connection method commit or else explicitly rolled back by
calling the Connection method rollback." (JDBC 3.0 spec, page 62).
So, you need to check your code if you commit or rollback before
returning the connection to the pool.
Best regards,
Roman Rokytskyy