You can set an endpoint property of:
org.apache.cxf.interceptor.OneWayProcessorInterceptor.USE_ORIGINAL_THREAD
to true to force it to stay on the original thread.
Dan
On Tuesday 16 November 2010 5:32:05 pm Coder One wrote:
> Hello,
>
> I am using CXF 2.2.5. Below is my destination. When the method is a
> @Oneway, onMessage spawns off a thread to invoke the @Oneway function.
>
> How can I get CXF to invoke the @Oneway function using the same thread that
> invoked toCXF()?
>
> Thanks...
>
> class MyDestination
> extends AbstractMultiplexDestination
> {
> public void toCXF()
> {
> MessageImpl cxfmsg = new MessageImpl();
>
> cxfmsg.setContent(someContentStream);
> cxfmsg.setDestination(this);
>
> ExchangeImpl exchange = new ExchangeImpl();
> exchange.setInMessage(cxfmsg);
>
> BusFactory.setThreadDefaultBus(bus);
> incomingObserver.onMessage(cxfmsg}
> }
> }
--
Daniel Kulp
[email protected]
http://dankulp.com/blog