-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate connection release and locking
PostPosted: Tue Feb 06, 2007 9:44 am 
Newbie

Joined: Tue Feb 06, 2007 9:30 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.