Announcement Announcement Module
No announcement yet.
Distributed transaction -- JMS Queue --> EHCache -->Database Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Distributed transaction -- JMS Queue --> EHCache -->Database

    hi guys

    I have a scenario where my JMS receiver is receiving a message from a active mq 'queue' storing it in cache (ehcahce) and saving some of the messages in the database table.

    I want to use spring distributed transaction but not sure how to proceed

    The tasks are
    JMS receiver gets message from Active MQ queue
    Save/update the message in EhCache
    Save/update the message in SQL Server using hibernate
    Commit/rollback the database transaction
    commit/rollback the message transaction

    Do i use Spring JTATransactionManager? I am using spring 3.0
    Since the database save/update is performed using Hibernate, can i use JTATransactionManager instead of HibernateTransactionManager?
    Do i have to use transacted session in my JMS Receiver? something like : Session session = connection.createSession(TRANSACTED, Session.AUTO_ACKNOWLEDGE);

    any help appreciated
    Last edited by jaggernat; Jun 10th, 2011, 10:31 PM.

  • #2
    I think you will probably find all the information you need, covering several options in this article:

    Hope that helps.


    • #3
      I alaready read that twice. unfortunately the link doesnt answer my questions. Specifically my questions are:
      1. Since the database save/update is performed using Hibernate, If i use JTATransactionManager, what should be my 'hibernate.transaction.factory_class' value and what should be my 'hibernate.transaction.manager_lookupclass' value?

      2. If i use JTATransactionManager can i still apply the transaction to my methods using spring AOP ?something like
      <tx:advice id="txAdvice" transaction-manager="websphereUOWTransactionManager">

      thanks for the response.