2008/11/3 TomStrummer <[EMAIL PROTECTED]>:
> Hi,
>
> I'm trying to use Camel+ServiceMix to expose what I'd call "real" POJO
> services (i.e. not @WebService annotated or rely on Camel/ServiceMix APIs)
> to build a message-driven application. What I mean is, I have several
> service classes like this:
>
> public interface BidRetriever {
> public List<Bid> getBids();
> }
>
> public interface BidDatabaseComponent {
> public int insertBids( List<Bid> bids );
> }
>
> And (non-annotated implementations) configured as Spring beans that I then
> configure via Camel like so:
>
> from("timer://tutorial?fixedRate=true&delay=3000&period=10000")
> .to("bean:bidRetriever")
> .to("bean:bidPersistence")
> .to("log:tom-bidList");
>
> Now, this version works great and basically does what I want, except now I
> want it to send the messages over JBI/JMS like so:
>
> from("timer://tutorial?fixedRate=true&delay=3000&period=10000")
> .to("bean:bidRetriever")
> .convertBodyTo(Serializable.class)
Converting to Serializable if the object already supports that
interface doesn't actually do anything BTW.
Have you tried using the data format support to explicitly marshal/unmarshall?
http://activemq.apache.org/camel/data-format.html
http://activemq.apache.org/camel/serialization.html
e.g.
marshal().serialization().
to(...")
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://fusesource.com/