Hi all,

We have a problem to register OSGi services with JNDI (mostly in the
java:comp  context and its subcontexts) for supporting legacy
applications moved to OSGi (but not fully converted).

So my idea was to add whiteboard pattern registration support for JNDI:
Each service registered with a special service registration property,
say aries.jndi.name, is registered within a JNDI context.

For example if the UserTransaction service is registered with
   aries.jndi.name = java:comp/UserTransaction
it would be registered as java:comp/UserTransaction.

Likewise a DataSource service registered with
   aries.jndi.name = java:comp/env/jdbc/sampleDS
would be registered as java:comp/env/jdbc/sampleDS

The environment of the initial context used by this whiteboard helper is
configurable with ConfigurationAdmin configuration (defaulting to an
empty environment).

Does this make sense ?

I have created a first version of such a JNDI white board support
"service", which I would be contributing.

Regards
Felix

Reply via email to