« Return to Thread: Mule closes down when the ActiveMQ server is shut down.

Re: Mule closes down when the ActiveMQ server is shut down.

by Manupriya :: Rate this Message:

Reply to Author | View in Thread

Hi,

I am also facing the same problem with Mule 2.0.2. If ActiveMQ is not up and running, I cannot start my Mule server and if I close the ActiveMQ server in between then Mule server goes down and throws exception.

Configuration file -

<spring:beans>
   
    <!-- Retry Connection Strategy for when we can't reach the topic -->
    <spring:bean name="SimpleRetryConnectionStrategy"
                 class="org.mule.transport.SimpleRetryConnectionStrategy">
      <spring:property name="retryCount" value="20" />
      <spring:property name="retryFrequency" value="5000" />
      <spring:property name="doThreading" value="false" />
    </spring:bean>
       
    </spring:beans>

Thanks,
Manupriya



Hi Geir,

Thanks for sharing your configuration. You said earlier in this thread that SimpleRetryConnectionStrategy is working fine for you with mule 2.0.2.
I also tried your configuration with Mule 2.02 & Activemq5.0. i am still facing the same problem with SimpleRetryConnectionStrategy. i have an inbound endpoint that subscribe to a topic. I shutdown my broker & when i bring the broker back online the endpoint is not able to receive anymore messages.
I am getting following error. Do you have any idea why i am getting this error? It would be great if you share your complete config file along with namespaces.

Thanks & regards,
JackyMule


ERROR 2008-08-29 06:40:00,953 [iMQReadChannel-0] org.mule.transport.jms.JmsConnector: Failed to reconnect to JMS server. I'm giving up.

ERROR 2008-08-29 06:41:05,956 [jmsConnector.dispatcher.5] org.mule.DefaultExceptionStrategy:
********************************************************************************
Message               : ReconnectStrategy "org.mule.transport.SingleAttemptConnectionStrategy" failed to reconnect receiver on endpoint
 "JmsMessageDispatcher{this=1703484, endpoint=jms://topic:jmsMessage, disposed=true}"
Type                  : org.mule.transport.FatalConnectException
Code                  : MULE_ERROR-163
JavaDoc               : http://mule.mulesource.org/docs/apidocs/org/mule/transport/FatalConnectException.html
********************************************************************************
Exception stack is:
1. Requester/dispatcher has been disposed; cannot connect to resource (java.lang.IllegalStateException)
  org.mule.transport.AbstractConnectable:173 (null)
2. ReconnectStrategy "org.mule.transport.SingleAttemptConnectionStrategy" failed to reconnect receiver on endpoint "JmsMessageDispatche
r{this=1703484, endpoint=jms://topic:jmsMessage, disposed=true}" (org.mule.transport.FatalConnectException)
  org.mule.transport.SingleAttemptConnectionStrategy:29 (http://mule.mulesource.org/docs/apidocs/org/mule/transport/FatalConnectExcepti
on.html)
********************************************************************************
Root Exception stack trace:
java.lang.IllegalStateException: Requester/dispatcher has been disposed; cannot connect to resource
        at org.mule.transport.AbstractConnectable.connect(AbstractConnectable.java:173)
        at org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:25)
        at org.mule.transport.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:108)
        at org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:261)
        at org.mule.work.WorkerContext.run(WorkerContext.java:310)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
        at java.lang.Thread.run(Unknown Source)








    <jms:activemq-connector name="jmsConnector.main"
                            brokerURL="${abonline_siebel.jms.brokerurl}" maxRedelivery="5"
                            specification="1.1" persistentDelivery="true"
                            clientId="esb-backbone"
                            durable="true" recoverJmsConnections="true"  
                            eagerConsumer="true">

        <spring:property name="connectionStrategy"
                         ref="retryConnectionStrategy"
                />
    </jms:activemq-connector>

    <spring:bean id="retryConnectionStrategy"
                 class="org.mule.transport.SimpleRetryConnectionStrategy">
        <spring:property name="retryCount" value="-1"/>
        <spring:property name="retryFrequency" value="15000"/>
    </spring:bean>

PawanModi wrote:
Hi Geir,

Can you share your config file & SimpleRetryConnectionStrategy?
I want to have a look to it.

Cheers,
Pawan Modi



Geir Arnesen wrote:
I am running on Mule 2.0.2

How do I prevent my Mule instance from shutting down when the ActiveMQ server is shut down.

I have implemented a SimpleRetryConnectionStrategy which works Ok, if I try to launch the Mule with no running ActiveMQ, and it gets it connection when when I the ActiveMQ has started up.

Geir

 « Return to Thread: Mule closes down when the ActiveMQ server is shut down.