I have a Spring-Camel app backed with a Mysql+Hibernate on a Tomcat. I’m trying to implement a transacted route that consumes from embedded ActiveMQ queue, makes some db based duplicate check and produces to another embedded ActiveMQ queue.
To provide transactionality I’m using Shared Transaction Resource pattern. Both Hibernate sessionFactory and ActiveMQ BrokerService JDBCPersistenceAdapter use the same datasource.
Camel endpoints use HibernateTransactionManager(PROPAGATION_REQUIRES_NEW). It seems to be working but I want to clarify if this is a bulletproof approach in case of system crash, failure,
Do I need to migrate to jta, 2PC?
We are going on with XA (Atomikos)