On Wednesday 17 November 2010 12:30:10 pm Coder One wrote: > I think I found it...in the constructor of the destination, > endpointInfo.setProperty(OneWayProcessorInterceptor.USE_ORIGINAL_THREAD, > Boolean.TRUE);
Yep. That's it. Dan > > > > ----- Original Message ---- > From: Coder One <[email protected]> > To: [email protected] > Sent: Tue, November 16, 2010 6:54:18 PM > Subject: Re: CXF Custom Destination / One Thread > > Hi Dan, > > Could you supply a bit more details? It's a bit of a headscratcher for me > to find that "endpoint property"...Thanks... > > > > ----- Original Message ---- > From: Daniel Kulp <[email protected]> > To: [email protected] > Cc: Coder One <[email protected]> > Sent: Tue, November 16, 2010 2:44:35 PM > Subject: Re: CXF Custom Destination / One Thread > > > 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
