Hello,
Environment: MSSQL server + Hibernate (3.2) + Jboss (4.01) and Struts
Transaction isolation level: 4096 (snapshot), (we modified the jtds driver to support this transaction isolation level).
The application uses the concurrent transactions.
Most of the time application is running fine. But sometimes the application is giving the exception like "GenericjDBCException". If this exception occurs we are retrying the transactions.
Unfortunately whenever this exception occurs, Hibernate does not release the connection (We are using the C3p0 connection provider). After that all transactions (which use the same tables locked by the corrupted transaction), are getting timeout. Then we tried with our own implementation of ConnectionProvider, so that it can completely close the connection whenever this exception occurs. The only solution for us to restart the server.
Whenever this exception occurs Hibernate is not invoking the closeConnection of ConnectionProvider.
Is this the known bug? Are we not supposed to use the snapshot isolation level?
2007-01-31 17:31:20,991 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException
(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:249)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java
Thanks
Mahendar
|