You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Pointless <po...@yahoo.com> on 2012/07/17 18:13:00 UTC

Camel CXF synchronous=true setting causes CXF bean invocation last for 60 seconds or more

Hello,

I'm using Camel with Servicemix (2.7.1.fuse-00-43).
The problem happens when setting synchronous=true - <to
uri="cxf:bean:cxfBean" /> invocation hangs for 60 or more seconds with no
obvious reason. The operation in WSDL is a one-way operation. I have also
tried defining CXF bus, and using URL options:
<to
uri="cxf://http://dummy?dataFormat=PAYLOAD&amp;synchronous=true&amp;wsdlURL=classpath:wsdl/aaa-bbb-CashManagement-Customer-V01.wsdl&amp;bus=#cxf-callback"
/>
but the result is the same. What are the reasons for such a delay in CXF
bean call? If I select synchronous=false, then error handling is not working
(as was described in the links in the comment below).

 


2012-07-17 *15:02:13*,477 | INFO  |
banktocustomerdebitcreditnotificationv02.MainRoute |
Exchange[Id:ID:vavi104a-48450-1342101770302-10:105:1:1:1];ReqId[igor_test_notification_004_VALID];http://localhost:9876/cashManagement
2012-07-17 *15:03:39*,902 | DEBUG |
banktocustomerdebitcreditnotificationv02.MainRoute |
Exchange[Id:ID:vavi104a-48450-1342101770302-10:105:1:1:1];ReqId[igor_test_notification_004_VALID];CashManagementV01.bankToCustomerDebitCreditNotificationV02
successfully executed.


Igor

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-synchronous-true-setting-causes-CXF-bean-invocation-last-for-60-seconds-or-more-tp5716160.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel CXF synchronous=true setting causes CXF bean invocation last for 60 seconds or more

Posted by Pointless <po...@yahoo.com>.
Hi Yogesh,

Thank you, I will check if this helps. The Camel version we are using is
2.7.1, and camel-cxf of the same version, so probably it has this bug. Not
sure how to check which version of CXF camel-cxf uses...  

Igor

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-synchronous-true-setting-causes-CXF-bean-invocation-last-for-60-seconds-or-more-tp5716160p5716188.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel CXF synchronous=true setting causes CXF bean invocation last for 60 seconds or more

Posted by ychawla <pr...@yahoo.com>.
Hi Igor,
I am not sure what version of Camel and CXF that FUSE version uses.  When
using the 'synchronous=true' URI option in Camel 2.6.0, I wrote an
interceptor to rethrow the exception so it would propogate back to my route. 
Something simple like:

public class CamelExceptionInterceptor extends
AbstractPhaseInterceptor<Message> {

	public CamelExceptionInterceptor() {
		super(Phase.SETUP);
	}

    @Override
    public void handleFault(Message message)
    {
            Exception exception = message.getContent(Exception.class);
            throw new Fault(exception);
    } 

	@Override
	public void handleMessage(Message message) throws Fault {
	} 
}

Otherwise, I think my client was hanging as well.  This is not an issue in
later versions of Camel.  On camel 2.8.x and higher, I took this interceptor
out and this synchronous flag worked without it.

Maybe this will help you out....

Thanks,
Yogesh


--
View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-synchronous-true-setting-causes-CXF-bean-invocation-last-for-60-seconds-or-more-tp5716160p5716178.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel CXF synchronous=true setting causes CXF bean invocation last for 60 seconds or more

Posted by Pointless <po...@yahoo.com>.
Hi,

Thank you for the reply.

We are dynamically setting the CXF endpoint address using the header
"CamelDestinationOverrideUrl", as this address is coming from the message
payload. Therefore, in CXF bean definition, the address is "http://dummy".
I will try the latest Camel version. The general problem for upgrading is
that we will need to perform a lot of reggression tests and probably some
minor changes to our existing services to work the exact same way.

Igor

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-synchronous-true-setting-causes-CXF-bean-invocation-last-for-60-seconds-or-more-tp5716160p5716186.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel CXF synchronous=true setting causes CXF bean invocation last for 60 seconds or more

Posted by Willem Jiang <wi...@gmail.com>.
Hi,

First I want to ask what is the "CamelDestinationOverrideUrl" for?

Did you have any chance to try the latest version of camel?

CAMEL-3987[1] should already fix the issue when the error handling 
doesn't work rightly in synchronous=false.

https://issues.apache.org/jira/browse/CAMEL-3987

On 7/18/12 12:13 AM, Pointless wrote:
> Hello,
>
> I'm using Camel with Servicemix (2.7.1.fuse-00-43).
> The problem happens when setting synchronous=true - <to
> uri="cxf:bean:cxfBean" /> invocation hangs for 60 or more seconds with no
> obvious reason. The operation in WSDL is a one-way operation. I have also
> tried defining CXF bus, and using URL options:
> <to
> uri="cxf://http://dummy?dataFormat=PAYLOAD&amp;synchronous=true&amp;wsdlURL=classpath:wsdl/aaa-bbb-CashManagement-Customer-V01.wsdl&amp;bus=#cxf-callback"
> />
> but the result is the same. What are the reasons for such a delay in CXF
> bean call? If I select synchronous=false, then error handling is not working
> (as was described in the links in the comment below).
>
>
>
>
> 2012-07-17 *15:02:13*,477 | INFO  |
> banktocustomerdebitcreditnotificationv02.MainRoute |
> Exchange[Id:ID:vavi104a-48450-1342101770302-10:105:1:1:1];ReqId[igor_test_notification_004_VALID];http://localhost:9876/cashManagement
> 2012-07-17 *15:03:39*,902 | DEBUG |
> banktocustomerdebitcreditnotificationv02.MainRoute |
> Exchange[Id:ID:vavi104a-48450-1342101770302-10:105:1:1:1];ReqId[igor_test_notification_004_VALID];CashManagementV01.bankToCustomerDebitCreditNotificationV02
> successfully executed.
>
>
> Igor
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-CXF-synchronous-true-setting-causes-CXF-bean-invocation-last-for-60-seconds-or-more-tp5716160.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
> .
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang