Hibernate version:2.1.7c
Mapping documents: Some classes setup with transactional cache
Code between sessionFactory.openSession() and session.close(): Managed by spring
Full stack trace of any exception that occurs: http://opensource.atlassian.com/project ... se/HB-1293
Name and version of the database you are using: Oracle 9i
The generated SQL (show_sql=true): Not relevant
Debug level Hibernate log excerpt: http://opensource.atlassian.com/project ... se/HB-1293
We see jbosscache 1.2 throwing the same exception when hibernate is configured using spring 1.1.3 via the usual spring idiom as explained in
http://www.hibernate.org/110.html
Like this:
<bean id="myTransactionManager"
class="org.springframework.orm.hibernate.HibernateTransactionManager">
<property name="sessionFactory">
<ref bean="mySessionFactory"/>
</property>
</bean>
<bean id="myProductServiceTarget"
class="product.ProductServiceImpl">
<property name="productDao">
<ref bean="myProductDao"/>
</property>
</bean>
<bean id="myProductService"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager">
<ref bean="myTransactionManager"/>
</property>
<property name="target">
<ref bean="myProductServiceTarget"/>
</property>
<property name="transactionAttributes">
<props>
<prop
key="increasePrice*">PROPAGATION_REQUIRED</prop>
<prop
key="someOtherBusinessMethod">PROPAGATION_MANDATORY</prop>
</props>
</property>
</bean>
What I would like to learn is that in the reference doc of hibernate we have the following:
14.4.5. Strategy: transactional
The transactional cache strategy provides support for
fully transactional cache providers such as JBoss
TreeCache. Such a cache may only be used in a JTA
environment and you must specify
hibernate.transaction.manager_lookup_class.
But what I understand from posts in the fixed issue @
http://opensource.atlassian.com/project ... se/HB-1293
is that one should use HibernateTransactionManager instead of JTA
Is this contradicting with the reference doc?
In other words what I am asking is that how can we run spring/hibernate/jbosscache together?
Should one use JTA and configure jbosscache with a TxManager Lookup class or should it work fine simply by configuring the sessionfactory bean about the cacheprovider being jbosscache as in above?