You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by inocult <in...@gmail.com> on 2009/02/06 06:22:09 UTC
Sending POJOs across the bus for OSGi
Hi everyone,
I apologize for my basic question but basically in the last month or so I've
been working at creating a OSGi based model driven device controller. This
controller had about 9-10 components that communicate via a shared message
queue.
While integrating the the service components I decided to use ServiceMix 4
NMR because of it's OSGi implementation. However I was now looking at
putting everything on the bus , even the device controllers. My current
question is how can exchanging pojos across the bus be handled? Do I have to
serialize everything, I'm a little concerned about the performance of such a
serialization process as it would need to go about 4-5
serialization/deserialization stages for a single command to the device.
Regards,
Mathieu
--
View this message in context: http://www.nabble.com/Sending-POJOs-across-the-bus-for-OSGi-tp21866758p21866758.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Sending POJOs across the bus for OSGi
Posted by Guillaume Nodet <gn...@gmail.com>.
If you use JBI, you're kinda stuck with XML for the content of the payload.
The ServiceMix 4 NMR supports any kind of payload however.
There are work arounds though, even when using JBI:
* put your POJOs as properties on the message. You could put a dummy
content for the xml body
* wrap your POJOs in a special kind of javax.xml.transform.Source objects
like org.apache.servicemix.components.util.xstream.XStreamSource
which allows endpoints to retrieve the object directly for those
who are aware
of this source type, or use xml for others
On Fri, Feb 6, 2009 at 06:22, inocult <in...@gmail.com> wrote:
>
> Hi everyone,
> I apologize for my basic question but basically in the last month or so I've
> been working at creating a OSGi based model driven device controller. This
> controller had about 9-10 components that communicate via a shared message
> queue.
>
> While integrating the the service components I decided to use ServiceMix 4
> NMR because of it's OSGi implementation. However I was now looking at
> putting everything on the bus , even the device controllers. My current
> question is how can exchanging pojos across the bus be handled? Do I have to
> serialize everything, I'm a little concerned about the performance of such a
> serialization process as it would need to go about 4-5
> serialization/deserialization stages for a single command to the device.
>
> Regards,
> Mathieu
> --
> View this message in context: http://www.nabble.com/Sending-POJOs-across-the-bus-for-OSGi-tp21866758p21866758.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com