Ideally I would like to abstract from presence in the messaging case. As a user bundle I just post to a topic or queue and the container level config should manage the connection to the jms server without the user bundle ever knowing.

So what I would like to have is a service on the container level that lets me map eventAdmin topics to jms servers and topics or queues. So of course there needs to be a place where the actual connection to the jms server is known but it should be outside the user bundle. Of course this container level service could use your idea to know about jms servers.

Christian


On 03.03.2014 16:34, Neil Bartlett wrote:
As a supplementary note, today you can use the Discovery and Topology aspects of OSGi Remote Services without the Distribution aspect for finding asynchronous endpoints and advertising presence.

For example suppose you have an AMQP broker, which can be represented as a URI something like this: "amqp:/hostname:port/exchangeId". You can advertise a service using a marker interface -- let's call it "Endpoint" -- setting the URI and service.exported.interfaces property. Then on a remote machine, you can use DS to inject the Endpoint service into your client code and get the AMQP URI. The client never directly invokes the service but uses the URI property to make an out-of-band connection.

The nice thing about this is you can easily de-advertise the URI by unpublishing the Endpoint service, so it's a very easy way to indicate presence.

Neil

--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to