JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-3981

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

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical 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:
    None

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

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds
Hide
Permalink
john demic added a comment - 22/Nov/08 10:37 AM

Sorry, I failed to add the full configuration. Here it is:

<jms:activemq-connector name="jmsConnector" specification="1.1" brokerURL="${jms.url}">
<spring:property name="retryPolicyTemplate">
<spring:bean class="SimpleRetryPolicyTemplate"/>
</spring:property>
</jms:activemq-connector>

Show
john demic added a comment - 22/Nov/08 10:37 AM Sorry, I failed to add the full configuration. Here it is: <jms:activemq-connector name="jmsConnector" specification="1.1" brokerURL="${jms.url}"> <spring:property name="retryPolicyTemplate"> <spring:bean class="SimpleRetryPolicyTemplate"/> </spring:property> </jms:activemq-connector>
Hide
Permalink
john demic added a comment - 22/Nov/08 03:42 PM

You can close this JIRA, it was user error on my part. I had MULE_HOME set to a 2.1.0 installation and not 2.1.1 inadvertently. Reconnection appears to working fine in 2.1.1 with ActiveMQ.

Show
john demic added a comment - 22/Nov/08 03:42 PM You can close this JIRA, it was user error on my part. I had MULE_HOME set to a 2.1.0 installation and not 2.1.1 inadvertently. Reconnection appears to working fine in 2.1.1 with ActiveMQ.
Hide
Permalink
Ken Yagen added a comment - 26/Mar/09 01:46 PM

Travis - can you review if this issue can be closed? The reporter indicates so.

Show
Ken Yagen added a comment - 26/Mar/09 01:46 PM Travis - can you review if this issue can be closed? The reporter indicates so.

People

  • Assignee:
    Travis Carlson
    Reporter:
    john demic
Vote (0)
Watch (0)

Dates

  • Created:
    22/Nov/08 10:36 AM
    Updated:
    30/Mar/09 08:36 AM
    Resolved:
    30/Mar/09 08:36 AM

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.