Announcement Announcement Module
No announcement yet.
spring/hibernate/jbosscache Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring/hibernate/jbosscache

    I'd like to learn how to go about configuring jbossCache in spring/hibernate setup.. This is of course not the place to ask but i wondered if anyone had a similar problem. See my post about the problem in hibernate forum if you wish:

    In the hibernate ref doc we have:
    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

    But we have the problem described here in a clustered environment:

    when we switch to using JTA TxManager. What I understand from the jira issue is that its fixed in jbossCache 1.1.1 (right? )

    I think the issue is about jbosscache tx and hibernate tx synchronization getting out of order when query cache is enabled.

    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 below:

    <bean id="myTransactionManager"
    class="org.springframework.orm.hibernate.Hibernate TransactionManager">
    <property name="sessionFactory">
    <ref bean="mySessionFactory"/>

    <bean id="myProductServiceTarget"
    <property name="productDao">
    <ref bean="myProductDao"/>

    <bean id="myProductService"
    class="org.springframework.transaction.interceptor .TransactionProxyFactoryBean">
    <property name="transactionManager">
    <ref bean="myTransactionManager"/>
    <property name="target">
    <ref bean="myProductServiceTarget"/>
    <property name="transactionAttributes">
    key="someOtherBusinessMethod">PROPAGATION_MANDATOR Y</prop>

    Hibernate 2.1.7c
    JbossCache 1.2
    Spring 1.1.3