servicemix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique De Vito (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SM-910) better handling of unavailable external http services
Date Fri, 06 Apr 2007 09:29:34 GMT

    [ https://issues.apache.org/activemq/browse/SM-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38967
] 

Dominique De Vito commented on SM-910:
--------------------------------------

It looks like ServiceMix is doing fine, without error, but not like I was expecting.

At the end, after a number of retries, ServiceMix (or ActiveMQ) puts the msg into a DLQ (Dead
Letter Queue). The pb is: I can't see this JMS DLQ queue through jconsole and I can't find
how to define myself the dlq destination. 

I want to be able to define myself the instruction flow in case of error. I see the following
solutions:

(1) extend the JMS component to be able to define a "erroneousTargetService" attribute like
this:

<jms:endpoint
role="consumer"
...
targetService="foo:ws_2"
rollbackOnError="true"
erroneousTargetService="foo:ws_2_bis"
...>

In case of error, the JMS consumer would try first (a) to follow the "erroneousTargetService"
way, and if this way fails too, it will (b) rollback at the end, just as today.

(2) let's define a try-catch component. In case of ERROR, this component would go to the "catch"
path for continuing the execution.

(3) let's see into internal ActiveMQ (or ServiceMix) configuration to know how to parametrize
as I want the DLQ.

Which solution do you think is more in spirit of ServiceMix ?

Have you got any advice about the best solution among the three above I may implement ?

Thanks.

> better handling of unavailable external http services
> -----------------------------------------------------
>
>                 Key: SM-910
>                 URL: https://issues.apache.org/activemq/browse/SM-910
>             Project: ServiceMix
>          Issue Type: Improvement
>          Components: servicemix-http
>    Affects Versions: 3.1
>            Reporter: Dominique De Vito
>             Fix For: 3.1.1
>
>         Attachments: patchfile.txt
>
>   Original Estimate: 1 hour
>  Remaining Estimate: 1 hour
>
> The org.apache.servicemix.http.processors.ProviderProcessor calls an external http service.
>             
> When calling an unavailable external http service, the following stack trace appears
after an exception rise:
> java.net.ConnectException: Connection refused: connect
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:516)
>         at java.net.Socket.connect(Socket.java:466)
>         at java.net.Socket.<init>(Socket.java:366)
>         at java.net.Socket.<init>(Socket.java:239)
>         at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:79)
>         at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:121)
>         at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
>         at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1321)
>         at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
>         at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
>         at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
>         at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
>         at org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:168)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
>         at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
>         at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>         at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
>         at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
>         at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
>         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
>         at java.lang.Thread.run(Thread.java:595)
> I think handling could be improved in case of (exchange instanceof InOnly == false),
so that a response could be returned. 
> See the attached patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message