Hi!
Maybe this can help:
Just use the JmsTransactionManager (for your connection, if not already configured) and TX-annotations or an tx:advice if TX-annotations are already bound to the database TX-manager:
Code:
<bean id="jmsTransactionManager"
class="org.springframework.jms.connection.JmsTransactionManager">
<property name="connectionFactory" ref="connectionFactory"/>
</bean>
<tx:annotation-driven transaction-manager="jmsTransactionManager"/>
or
<aop:config>
<aop:pointcut id="entryPointMethod" expression="execution(* *. senderMethod*(..))"/>
<aop:advisor
advice-ref="jmsTxAdvice"
pointcut-ref="entryPointMethod"/>
</aop:config>
<tx:advice id="jmsTxAdvice" transaction-manager="jmsTransactionManager">
<tx:attributes>
<tx:method name="*" propagation="NOT_SUPPORTED"/>
</tx:attributes>
</tx:advice>
Send your message within an injected bean and if using the annotation style just annotate these sender methods:
Code:
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public ... send(...) {
...
Hope this helps.
Bye, Torsten