activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kpetrov <KVPet...@OwnMail.net>
Subject Re: spring transaction configuration, AMQ 5.1
Date Mon, 30 Jun 2008 22:00:19 GMT

Can anybody help? It's been more than three weeks...
What I have seems to be the simplest possible transacted coniguration of
ActiveMQ + Spring where I recieve and send messages in transaction. I can't
believe people don't have a problem similar to mine...


kpetrov wrote:
> 
> I'm trying to setup a simple transactional setup where I receive a message
> using "DefaultMessageListenerContainer" and then send it using
> JmsTemplate.
> When I look at the log I have the following messages non stop:
> 
> 13:14:54 DEBUG ID:kvp-pro-2.local-61811-1212437692103-2:0:5 Transaction
> Commit
> 13:14:54 DEBUG ID:kvp-pro-2.local-61811-1212437692103-2:0:12 Transaction
> Commit
> 13:14:54 DEBUG Removing consumer:
> ID:kvp-pro-2.local-61811-1212437692103-2:0:5:1
> 13:14:54 DEBUG ID:kvp-pro-2.local-61811-1212437692103-2:0:15 Transaction
> Commit
> 13:14:54 DEBUG ID:kvp-pro-2.local-61811-1212437692103-2:0:8 Transaction
> Commit
> 13:14:54 DEBUG Removing consumer:
> ID:kvp-pro-2.local-61811-1212437692103-2:0:12:1
> 13:14:54 DEBUG ID:kvp-pro-2.local-61811-1212437692103-2:0:10 Transaction
> Commit
> 13:14:54 DEBUG Adding consumer:
> ID:kvp-pro-2.local-61811-1212437692103-2:0:16:1
> 13:14:54 DEBUG Removing consumer:
> ID:kvp-pro-2.local-61811-1212437692103-2:0:15:1
> 13:14:54 DEBUG Adding consumer:
> ID:kvp-pro-2.local-61811-1212437692103-2:0:17:1
> 13:14:54 DEBUG Adding consumer:
> ID:kvp-pro-2.local-61811-1212437692103-2:0:18:1
> 
> I looked up the thread that essentially suggested that starting from
> spring 2.5.1 I should not have this problem. I'm using 2.5.4. I have an
> embedded active mq broker 5.1. There are no messages in the queue. Does
> anybody know what is going on?
> 
> Below is the my spring configuration:
> 
> 	<bean id="connectionFactory"
> 		class="org.apache.activemq.ActiveMQConnectionFactory"
> 		depends-on="activemqWrapper">
> 		<property name="brokerURL"
> value="${brokerTransport}://${brokerHost}:${brokerPort}" />
> 	</bean>
> 
> 	<bean id="singleConnectionFactory"
> 		class="org.springframework.jms.connection.SingleConnectionFactory"
> destroy-method="destroy">
> 		<property name="targetConnectionFactory" ref="connectionFactory"/>
> 	</bean>
> 
> 
> 	<bean id="jmsTemplate"
> 		class="org.springframework.jms.core.JmsTemplate">
> 		<property name="connectionFactory" ref="singleConnectionFactory" />
> 		<property name="explicitQosEnabled" value="true" />
> 		<property name="sessionTransacted" value="true" />
> 	</bean>
> 
> 	<bean id="jmsTransactionManager"
> class="org.springframework.jms.connection.JmsTransactionManager" >
> 		<property name="connectionFactory" ref="singleConnectionFactory"/>
> 	</bean>
> 	
> 	 
> 	<bean
> 	
> class="org.springframework.jms.listener.DefaultMessageListenerContainer">
> 		<property name="connectionFactory" ref="singleConnectionFactory" />
> 		<property name="destination" ref="central.incomingQueue" />
> 		<property name="messageListener" ref="incomingMdp" />
>  	 	<!--  	 	 --> 
>  	 	<property name="transactionManager" ref="jmsTransactionManager" />
> 
> 	 	<property name="sessionTransacted" value="true"/>
> 		<property name="concurrentConsumers" value="5" />
> 	</bean>
> 
> 

-- 
View this message in context: http://www.nabble.com/spring-transaction-configuration%2C-AMQ-5.1-tp17610003p18205322.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message