camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Krebs <cake...@gmx.de>
Subject Re: spring remoting over jms
Date Mon, 21 Jan 2008 16:58:19 GMT

Hi,

thanks for the help. And Finally I got it working!
But the problem, was a little bit curious.

The activemq broker I used, was not running on the default port (61616),
instead I used the port (41616).
Using this port, lead to the following exceptions on the remote side,
whereas the first exception was swallowed by the
DefaultMessageListenerContainer:


org.springframework.jms.listener.AbstractJmsListeningContainer$SharedConnectionNotInitializedException:
This listener container's shared Connection has not been initialized yet
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.getSharedConnection(AbstractJmsListeningContainer.java:251)
	at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:285)
	at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:254)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:871)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:818)
	at java.lang.Thread.run(Thread.java:619)

and some seconds later to

javax.jms.JMSException: Could not connect to broker URL:
tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused
	at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
	at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:276)
	at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:220)
	at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:168)
	at
org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:188)
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:209)
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.refreshSharedConnection(AbstractJmsListeningContainer.java:197)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:701)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer.recoverAfterListenerSetupFailure(DefaultMessageListenerContainer.java:683)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:835)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:518)
	at
org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:400)
	at
org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:366)
	at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:48)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:56)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:56)
	at
org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:63)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:56)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:56)
	at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:256)
	... 9 more

The curious about these exceptions is, that I definitely declared the right
port in the broker and on the consumer, and not the one, the
ActiveMQConnectionFactory is trying to use:

	<bean id="activemq"
		class="org.apache.camel.component.jms.JmsComponent"
		depends-on="broker">
		<property name="connectionFactory">
			<bean
				class="org.apache.activemq.ActiveMQConnectionFactory">
				<property name="brokerURL"
					value="tcp://localhost:41616" />
			</bean>
		</property>
	</bean>

Switching back to the default port solved the problem.

Regards,

Carsten

-- 
View this message in context: http://www.nabble.com/spring-remoting-over-jms-tp14640388s22882p15001670.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message