You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2016/09/05 07:13:20 UTC

[jira] [Assigned] (CXF-7038) ensure the JMS Connection get refreshed so that the jms retry can get a useful Connection

     [ https://issues.apache.org/jira/browse/CXF-7038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang reassigned CXF-7038:
---------------------------------

    Assignee: Freeman Fang

> ensure the JMS Connection get refreshed so that the jms retry can get a useful Connection
> -----------------------------------------------------------------------------------------
>
>                 Key: CXF-7038
>                 URL: https://issues.apache.org/jira/browse/CXF-7038
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>
> The JMSConduit.sendAndReceiveMessage should throw JMSException as in the caller JMSConduit.sendExchange we catch the JMSException and refresh the JMS connection so that we can get a useful retry with refreshed connection like
> {code}
> } catch (JMSException e) {
>             // Close connection so it will be refreshed on next try
>             ResourceCloser.close(connection);
>             this.connection = null;
>             this.staticReplyDestination = null;
>             if (this.jmsListener != null) {
>                 this.jmsListener.shutdown();
>             }
>             this.jmsListener = null;
>             try {
>                 Thread.sleep(1000);
>             } catch (InterruptedException e1) {
>                 // Ignore
>             }
>             throw JMSUtil.convertJmsException(e);
>         } finally {
>             closer.close();
>         }
> {code}
> ensure the connection get refreshed is important for example when the external jms broker get restarted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)