-->
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: could not release a cache lock
PostPosted: Sat Aug 13, 2005 2:23 am 
Newbie

Joined: Thu Jun 02, 2005 5:03 am
Posts: 15
I am using spring, hibernate and treecache in my application. I tried doing transaction management in two ways -

1. Initiate hibernate's JTA Transactions
a) Specified "hibernate.transaction.factory_class" property in LocalSessionFactoryBean. This property is for initiating hibernate JTA Transactions.
<prop key="hibernate.transaction.factory_class">net.sf.hibernate.transaction.JTATransactionfactory</prop>
b) Specified "hibernate.transaction.manager_lookup_class" property in LocalSessionFactoryBean. This property is used by hibernate to pass transaction manager to TreeCache
<prop key="hibernate.transaction.manager_lookup_class">net.sf.hibernate.transaction.WebsphereTransactionManagerLookup</prop>
c) Specified bean HibernateTransactionManager in applicationContext.xml and passed it to transactionInterceptor.
<bean id="hibernateTransactionManger" class="org.springframework.orm.hibernate.HibernateTransactionManager"><property name="sessionFactory"><ref local="sessionFactory"/></property></bean>

In this case when spring's HibernateTransactionManager is called, it delegates control to hibernate's JTA

2. Initiate spring's JTA Transactions
a) Specified "hibernate.transaction.manager_lookup_class" property in LocalSessionFactoryBean.
<prop key='hibernate.transaction.manager_lookup_class">net.sf.hibernate.transaction.WebsphereTransactionManagerLookup</prop>
b) Specified bean JtaTransactionManager in applicationContext.xml and passed it to transactionInterceptor.
<bean id="jtaTransactionManger" class="org.springframework.transaction.jta.JtaTransactionManager"/>

My code works well when i go for 1st option. However i want to use 2nd option(spring's JTA), which doesnt works. I get the following error - "could not release a cache lock" from SessionImpl.


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.