Hi at all,
I write this email to ask on ml if my idea could be valid to the future
of smx/camel.
JBI will be soon deprecated like NMR, so why doesn't use OSGI directly
to communicate between bundles and components with a common API?
In my head i think to a framework like MessageExchange or Camel Exchange
where:
- there is an interface OsgiExchange with classic methods: getProperty,
setProperty, getIn/getOut (return OsgiMessage interface)
- a common communication interface OsgiExchangeService that expone a
method:
public OsgiExchange callService (String serviceName,
OsgiExchange exchange,
boolean useCopy)
throws Exception;
Every bundles that expose a osgi service use this interface and set osgi
properties to discriminate osgi service between different bundles.
Obviously, client of the osgi service use reference with "filter"
argument to call a particular service.
On first step this solution can be use directly on camel (without have a
from("osgi:/xxx) ) with a simple object that implement
OsgiExchangeService, convert OsgiMessage to Exchange and send exchange
to a predefined route through a simple ProducerTemplate class.
Same solution can be used with cxf to call osgi service like for
MessageExchange through callService method and OsgiExchange.
What do people think about this?
Regards,
Geaaru