Uploaded image for project: 'Mule'
  1. Mule
  2. MULE-3981

Custom retry-template doesn't appear to be reconnecting with a lost JMS server

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.1.1
    • Component/s: Transport: JMS
    • Labels:
      None
    • Environment:

      OS/X

    • User impact:
      Medium
    • Configuration:
      Hide

      <jms:activemq-connector name="jmsConnector" specification="1.1" brokerURL="$

      {jms.url}

      ">

      Show
      <jms:activemq-connector name="jmsConnector" specification="1.1" brokerURL="$ {jms.url} ">
    • Log Output:
      Hide
      ERROR 2008-11-22 11:33:13,097 [jmsConnector.dispatcher.1] org.mule.DefaultExceptionStrategy: Caught exception in Exception Strategy: The JMS connection has failed: java.io.EOFException
      org.apache.activemq.ConnectionFailedException: The JMS connection has failed: java.io.EOFException
      at org.apache.activemq.ActiveMQConnection.checkClosedOrFailed(ActiveMQConnection.java:1260)
      at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:294)
      at org.mule.transport.jms.Jms11Support.createSession(Jms11Support.java:63)
      at org.mule.transport.jms.JmsConnector.getSession(JmsConnector.java:415)
      at org.mule.transport.jms.JmsConnector.getSession(JmsConnector.java:387)
      at org.mule.transport.jms.JmsMessageDispatcher.dispatchMessage(JmsMessageDispatcher.java:128)
      at org.mule.transport.jms.JmsMessageDispatcher.doDispatch(JmsMessageDispatcher.java:65)
      at org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:273)
      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(Thread.java:613)
      Caused by: java.io.EOFException
      at java.io.DataInputStream.readInt(DataInputStream.java:358)
      at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:269)
      at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:203)
      at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:195)
      at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183)
      ... 1 more
      Show
      ERROR 2008-11-22 11:33:13,097 [jmsConnector.dispatcher.1] org.mule.DefaultExceptionStrategy: Caught exception in Exception Strategy: The JMS connection has failed: java.io.EOFException org.apache.activemq.ConnectionFailedException: The JMS connection has failed: java.io.EOFException at org.apache.activemq.ActiveMQConnection.checkClosedOrFailed(ActiveMQConnection.java:1260) at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:294) at org.mule.transport.jms.Jms11Support.createSession(Jms11Support.java:63) at org.mule.transport.jms.JmsConnector.getSession(JmsConnector.java:415) at org.mule.transport.jms.JmsConnector.getSession(JmsConnector.java:387) at org.mule.transport.jms.JmsMessageDispatcher.dispatchMessage(JmsMessageDispatcher.java:128) at org.mule.transport.jms.JmsMessageDispatcher.doDispatch(JmsMessageDispatcher.java:65) at org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:273) 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(Thread.java:613) Caused by: java.io.EOFException at java.io.DataInputStream.readInt(DataInputStream.java:358) at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:269) at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:203) at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:195) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183) ... 1 more
    • Similar Issues:

      Description

      I have the following AbstractPolicyTemplate and RetryPolicy implementations:

      public class SimpleRetryPolicyTemplate extends AbstractPolicyTemplate {

      public RetryPolicy createRetryInstance()

      { return new SimpleRetryPolicy(); }

      protected static class SimpleRetryPolicy implements RetryPolicy {
      public PolicyStatus applyPolicy(Throwable throwable) {
      try

      { Thread.sleep(5000); }

      catch (InterruptedException e)

      { throw new RuntimeException(e); }

      return PolicyStatus.policyOk();
      }
      }
      }

      When configured on an ActiveMQ connector as follows:

      <jms:activemq-connector name="jmsConnector" specification="1.1" brokerURL="$

      {jms.url}

      ">

      The retry policy works on Mule startup - if the ActiveMQ server is down, the connector will attempt to reconnect every 5 seconds. If I bring the ActiveMQ server down, however, the exception entered in "Log Output" is thrown. The "Configuring Retry Policies" documentation (http://mule.mulesource.org/display/MULE2USER/Configuring+Retry+Policies) seems to indicate this should work. I haven't (yet) tested with other transport.s

        Attachments

          Activity

            People

            • Assignee:
              tcarlson Travis Carlson
              Reporter:
              johndemic John D'Emic
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                20/Oct/08

                Zendesk Support