Announcement Announcement Module
Collapse
No announcement yet.
WebServiceTemplate and synchronous JMS Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • WebServiceTemplate and synchronous JMS

    Hi
    I m trying to use WebServiceTemplate to make synchronous request/reply over JMS transport. Message broker is IBM MQ, connection factory is com.ibm.mq.jms.MQConnectionFactory. I configure my WebServiceTemplate as follows

    Code:
    <bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
    		<property name="messageFactory">
    			<bean class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory">
    				<property name="soapVersion" value="${jms.soapVersion}" />
    			</bean>
    		</property>
    		<property name="messageSender">
    			<bean class="org.springframework.ws.transport.jms.JmsMessageSender">
    				<property name="sessionTransacted" value="true" />
    				<property name="receiveTimeout" value="${jms.receiveTimeout}" />
    				<property name="connectionFactory" ref="connectionFactory" />
    			</bean>
    		</property>
    		<property name="marshaller" ref="marshaller" />
    		<property name="unmarshaller" ref="marshaller" />
    	</bean>
    and use it
    Code:
    SomeResponse response = (SomeResponse) webServiceTemplate.marshalSendAndReceive(
    					"jms:somequeur?replyToName=somereplyqueue", request);
    The problem is that if sessionTransacted is true, messages retains until the transaction commits, but it don't commits.
    I have no ideas how can i fix it.
Working...
X