Hi,

Could you also configure  "sessionTransacted" as "true" for 
org.apache.cxf.transport.jms.JMSConfiguration?
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋



On 2013-9-14, at 上午6:57, Nan wrote:

> I am using cxf 2.7.6 and trying to receive soap message over jms. 
> 
> I need to get messge from inbound queue, process it(DB action), then
> response back to the outbound queue. at any phrase when problem happen, the
> DB action should be reverted.
> 
> The message can be received, processed and sent back correctly, but I
> noticed that there is no transaction. I prefer use spring transaction
> annotation, but I found there is no good place for me to put it. I want to
> start the tx when I get jms message, so when I process the message
> right(update DB) and send back message has problem, the DB change can be
> reverted.
> all my resources are XAResource.
> here is my configuration.
> 
> 
> <jaxws:endpoint id="tasaJmsServiceEndPoint" address="jms://" 
> implementor="#tasaWebServiceOverJms">
>               <jaxws:features>
>                       <bean 
> class="org.apache.cxf.transport.jms.JMSConfigFeature"
> p:jmsConfig-ref="tasaJmsConfig" />
>                       <wsa:addressing 
> xmlns:wsa="http://cxf.apache.org/ws/addressing";
> allowDuplicates="true" usingAddressingAdvisory="true"/>
>               </jaxws:features>
>       </jaxws:endpoint>
> 
>       <bean id="tasaJmsConfig"
> class="org.apache.cxf.transport.jms.JMSConfiguration"
>               p:connectionFactory-ref="tasaConnectionFactory" 
>               p:targetDestination="tasaInboundQueue"
>               p:replyDestination="tasaOutboundQueue"
>               p:destinationResolver-ref="jmsDestinationResolver"
>               p:transactionManager-ref="transactionManager"
>               />    
> <jee:jndi-lookup id="tasaConnectionFactory"
> jndi-name="mqForeignConnectionFactory" />
> 
> <tx:jta-transaction-manager/>
> <bean id="jmsDestinationResolver"
> class="org.springframework.jms.support.destination.JndiDestinationResolver"
> p:resourceRef="true"/>
> 
> 
> @WebService(
> 
> endpointInterface="com.webservice.service.TasaWebServiceOverJmsEndPoint",
>        serviceName="TasaServiceOverJms",
>        portName="TasaServiceverJmsPort")
> @Addressing(enabled=true, required=false)
> @Transactional  //* I really doubt I want to put a transactional here, it
> should start ealier than here.*
> public class TasaWebServiceOverJmsEndPointImpl implements
> TasaWebServiceOverJmsEndPoint {
> 
> 
> 
> 
> --
> View this message in context: 
> http://cxf.547215.n5.nabble.com/cxf-enable-jta-transaction-on-jms-transport-tp5734088.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to