camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: spring remoting over jms
Date Mon, 21 Jan 2008 17:03:58 GMT
On 21/01/2008, Carsten Krebs <cake_ad@gmx.de> wrote:
>
> Hi,
>
> thanks for the help. And Finally I got it working!

Awesome, thanks for letting us know...


> 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:


Hmm - I wonder if we should force the creation of a connection on
startup of the consumer, to ensure things work correctly...


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.

Hmm - did you explicitly configure the activemq component on the
remote side too?

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Mime
View raw message