Hi Freeman,
thank very much for your answer,
I have already tried that but the exception is the same of the first time
[I have reported the wrong exception, sorry, it actually was:
9-gen-2009 17.57.58 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault
at
org.apache.servicemix.cxfbc.CxfBcConsumer$JbiPostInvokerInterceptor.handleMessage(CxfBcConsumer.java:454)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at
org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:184)
at
org.apache.servicemix.cxfbc.CxfBcConsumer.process(CxfBcConsumer.java:183)
at
org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handleMessage(CxfBcConsumer.java:430)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:268)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:224)
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:54)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)]
Yesterday I tried to change distribution and I used 3.2.3, where there is the
chance to set a timeout in the cxf-bc configuration.
The possibility to configure was already fixed by Freeman!!
Thank you again!
For who is interested:
https://issues.apache.org/activemq/browse/SM-1221;jsessionid=08F7B937BF39C305509F38CA7831BE4D?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
Best Regards,
anna
---------- Initial Header -----------
>From : "Freeman Fang" [email protected]
To : [email protected]
Cc :
Date : Sat, 10 Jan 2009 13:31:06 +0800
Subject : Re: How to set a timeout for an InOut exchange
> [email protected] wrote:
> > Dear all,
> >
> > I'll be very grateful if someone could help me.
> > I'm using Servicemix 3.2.1, I used inside a cxf-se an InOut
> > exchange to communicate with a bean-se.
> > My exchange must receive a response in a few time.
> > Could you tell me how can I set the timeout that wait for the response to
> > be longer than the default and to be a choosen value, please?
> > I thank you in advance for your help.
> > Best Regards,
> > Anna.
> >
> > PS: Here I have reported the code and the exception so you can confirm that
> > I need to set a longer timeout:
> >
> > CODE:
> > ClientFactory factory = (ClientFactory) new
> > InitialContext().lookup(ClientFactory.DEFAULT_JNDI_NAME);
> > ServiceMixClient client = factory.createClient();
> > Destination destination =
> > client.createDestination("service:http://myproject.com/components/communicationManager");
> > InOut inOutExchange = destination.createInOutExchange();
> > NormalizedMessage message = inOutExchange.getInMessage();
> > inOutExchange.getInMessage().setContent(new StringSource("aRequest"));
> >
> > logger.info("Target sends!");
> > client.sendSync(inOutExchange);
> >
> >
> here you can use
> client.sendSync(inOutExchange, your_timeout_value);// the timeout is in ms
> Freeman
> > System.err.println(new
> > SourceTransformer().contentToString(inOutExchange.getOutMessage()));
> > logger.info("Target receives!");
> >
> > SourceTransformer sourceTransformer = new SourceTransformer();
> > String stringReturnMessage =
> > sourceTransformer.toString(inOutExchange.getOutMessage().getContent());
> > logger.info("Target received: " + stringReturnMessage);
> >
> > EXCEPTION:
> > 9-gen-2009 14.57.57 org.apache.cxf.transport.jbi.JBIDestinationOutputStream
> > commitOutputMessage
> > GRAVE: error sending Out message
> > org.apache.servicemix.jbi.ExchangeTimeoutException: Exchange has timed out:
> > InOut[
> > id: ID:192.168.32.32-11ebbae1faa-4:4
> > status: Error
> > role: provider
> > interface: {http://myproject.com/NDTWS/}TargetWSImpl
> > service: {http://myproject.com/NDTWS/}TargetWSImplService
> > endpoint: TargetWSImplPort
> > operation: {http://myproject.com/NDTWS/}doLogin
> > in: "aResponse"]
> >
> >
> >
> >
> >
> >
> >
> >
>
>