You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jmiess <jm...@gmx.de> on 2006/11/30 21:08:56 UTC

JMS (AMQ) to JMS (JBoss) bridge reconnection problem

Hi community
I need some help conserning JMS to JMS bridge
When I'm sending a message fom an embedded ActiveMQ to the JBoss JMS
everthing works fine. But as soon as I restart the JBoss the AMQ JMS fails
to send messages to the JBoss JMS again.
AMQ complains that the Client "is not connected"

Pleas, can anybody hep me out? Thank you very much.

I'm using ActiveMQ 4.0.2 as embedded broker
that's my Spirng configuration

<!-- the broker -->
<bean id="msgBrokerService" class="org.apache.activemq.broker.BrokerService"
...>
...
  <property name="jmsBridgeConnectors">
    <list>
      <ref bean="jmsQueueConnector"/>
   </list> 
 </property>
...
</beans>

<!-- the jms queue connector -->
   <bean id="jmsQueueConnector"
class="org.apache.activemq.network.jms.JmsQueueConnector"...>
      <property name="name" value="jmsQueueBridge"/>
      <property name="jndiOutboundTemplate" ref="remoteJndi"/>
      <property name="outboundQueueConnectionFactoryName"
value="UIL2ConnectionFactory"/>
      <property name="outboundQueueBridges">
         <list>
            <ref bean="outboundQueueJbossBridge" />
         </list>
      </property>  
  </bean>

<!-- jndi template -->
  <bean id="remoteJndi" class="org.springframework.jndi.JndiTemplate" ...>
    <property name="environment">
      <props>
        <prop key="java.naming.provider.url">jnp://localhost:1099</prop>
<!-- 192.168.178.25:1099 -->
        <prop
key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
      </props>
    </property>
  </bean>	

<!-- outbound queue -->
   <bean id="outboundQueueJbossBridge"
class="org.apache.activemq.network.jms.OutboundQueueBridge"
        abstract="false" singleton="true" lazy-init="default"
autowire="default" dependency-check="default">
      <property name="outboundQueueName" value="queue/CltToSrv"/>
   </bean> 

As long as the JBoss is started when I start the embedded ActiveMQ everythin
works just fine.
But when I restart the JBoss he resulting erro log is as follows.

2006-11-30 21:04:19,359 ERROR [ActiveMQ Session Task]
network.jms.DestinationBridge:(115) - failed to forward message:
ActiveMQTextMessage {commandId = 13, responseRequired = true, messageId =
ID:hjmiess-1187-1164916980140-4:2:2:1:1, originalDestination = null,
originalTransactionId = null, producerId =
ID:hjmiess-1187-1164916980140-4:2:2:1, destination = queue://CltToSrv,
transactionId = null, expiration = 0, timestamp = 1164917059343, arrival =
0, correlationId = null, replyTo = null, persistent = true, type = null,
priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null,
compressed = false, userID = null, content =
org.apache.activeio.packet.ByteSequence@136102e, marshalledProperties =
null, dataStructure = null, redeliveryCounter = 0, size = 600, properties =
null, readOnlyProperties = true, readOnlyBody = true, text = Message for
local testQueue***(0)***}
org.jboss.mq.SpyJMSException: Cannot send a message to the JMS server; -
nested throwable: (java.io.IOException: Client is not connected)
	at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:66)
	at
org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:51)
	at org.jboss.mq.Connection.sendToServer(Connection.java:969)
	at org.jboss.mq.SpySession.sendMessage(SpySession.java:975)
	at org.jboss.mq.SpyMessageProducer.send(SpyMessageProducer.java:265)
	at org.jboss.mq.SpyMessageProducer.send(SpyMessageProducer.java:204)
	at org.jboss.mq.SpyQueueSender.send(SpyQueueSender.java:59)
	at
org.apache.activemq.network.jms.QueueBridge.sendMessage(QueueBridge.java:84)
	at
org.apache.activemq.network.jms.DestinationBridge.onMessage(DestinationBridge.java:112)
	at
org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:795)
	at
org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:96)
	at
org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:149)
	at
org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:110)
	at
org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:25)
	at
org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
	at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Client is not connected
	at
org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.java:238)
	at org.jboss.mq.il.uil2.SocketManager.sendMessage(SocketManager.java:206)
	at org.jboss.mq.il.uil2.UILServerIL.addMessage(UILServerIL.java:267)
	at org.jboss.mq.Connection.sendToServer(Connection.java:965)
	... 15 more

Thans you verry much for your help



-- 
View this message in context: http://www.nabble.com/JMS-%28AMQ%29-to-JMS-%28JBoss%29-bridge-reconnection-problem-tf2733999.html#a7626906
Sent from the ActiveMQ - User mailing list archive at Nabble.com.