2009/9/14 Scott Parkerson <[email protected]>: > Hello, > > I'm trying to use Camel 1.6.1 in SMX 4.1.0.2 (FUSE) and the POJO > Producing / Consuming annotations as described in the online > documentation. > > In one class (a CXF-based RESTful webservice), I have the following set > up: > > // OutboundFooRequestHandler is an interface (see below) > �...@produce(uri="activemq:queue:outbound_foo_req") > private OutboundFooRequestHandler outboundFooRequestHandler; > > �...@post > �...@path("/sendfoo") > public Response sendFoo(OutboundFooRequest sendFooRequest) > { > // (a bunch of web-specific code deleted) > > // send this sendFooReqest object on the queue > outboundFooRequestHandler.handle(sendFooRequest); > > // Return HTTP response 202 Accepted > return Response.status(202).build(); > } > > > The interface that is annotated with Produce is shown below: > > @InOnly > public interface OutboundFooRequestHandler > { > public void handle(OutboundFooRequest outboundFooRequest); > } > > Here is the implementation of the interface: > > public class OutboundFooRequestHandlerImpl implements > OutboundFooRequestHandler, InitializingBean, DisposableBean > { > > private static final Logger logger = > LoggerFactory.getLogger(OutboundFooRequestHandlerImpl.class); > > �...@override > �...@consume(uri="activemq:queue:outbound_foo_req") > public void handle(@Body OutboundFooRequest outboundFooRequest) > { > logger.debug("got it"); > > // TODO: actually *do* something > } > > The producer and the consumer's bundle-context.xml has this: > > <camelContext > xmlns="http://activemq.apache.org/camel/schema/spring" /> > > <bean name="activemq" > class="org.apache.camel.component.jms.JmsComponent"> > <property name="connectionFactory"> > <bean class="org.apache.activemq.ActiveMQConnectionFactory"> > <property name="brokerURL" value="vm://default" /> > </bean> > </property> > </bean> > > I can send a message, but the consumer doesn't wake up and pick up the > message. > > It's worth noting that the producer and the consumer are in two > different bundles. > > What am I missing?
Are you creating your OutboundFooRequestHandlerImpl class by configuring it in Spring XML? Or are you using the Spring 3 component scan stuff? -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/
