Java Reference
In-Depth Information
public class FrontDeskImpl extends JmsGatewaySupport implements FrontDesk {
public void sendMail(Mail mail) {
import org.springframework.transaction.annotation.Transactional;
public class BackOfficeImpl extends JmsGatewaySupport implements BackOffice {
public Mail receiveMail() {
Then, in both bean configuration files, you add the <tx:annotation-driven /> element and
declare a transaction manager. The corresponding transaction manager for local JMS transactions is
JmsTransactionManager , which requires a reference to the JMS connection factory.
<beans xmlns=""
<tx:annotation-driven />
<bean id="transactionManager"
<property name="connectionFactory">
<ref bean="connectionFactory" />
If you require transaction management across multiple resources, such as a data source and an
ORM resource factory, or if you need distributed transaction management, you have to configure JTA
transaction in your application server and use JtaTransactionManager . Of course, your JMS connection
factory must be XA compliant (i.e., supporting distributed transactions).
Search WWH ::

Custom Search