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