I went through this bog and it was very useful in understanding most of the concepts of spring integration.
http://blog.springsource.com/2009/02...-on-dm-server/
But i was stuck at one point
I tried to follow a similar model for my application with 3 bundles
Bundle A(sender) - unaware of spring integration API
Bundle B(receiver) -unaware of spring integration API
Bundle X(channel exchange) -aware of spring integration API
Now i define a channel in bundle X ,and wrap it using a gateway.
Now i expose this gateway as a service implementing my interface.
Bundle A is able to send messages into the channel using interface on the gateway proxy,and is till unaware of the spring integration API'S
Now how does Bundle B receive this message which is on the channel ?
1. I do not want to publish this channel as OSGi service from bundle X and import in bundle B because it makes bundle B integration aware.
2. The other option I see is
Bundle B registers an OSGi service with Bundle X , and bundle X will call this service whenever message is put into the channel by bundle A.
But this makes my bundle X(channel exchange) more complicated as more recevers may need to listen to this channel and i have to write code to iterate through these services and call method one after the other.
Is there any simpler way to achive this ? can i use teh gateway proxy itself by nay means ?


Reply With Quote
