Hi I assume you have added a service property named osgi.jndi.service.name to your service.
If you want to reference your service in OSGi managed code (e.g. blueprint bean) you can just reference the service and inject into your bean like in this sample https://github.com/cschneider/Karaf-Tutorial/blob/master/db/examplejdbc/src/main/resources/OSGI-INF/blueprint/blueprint.xml. If you want to use the service in code which is not managed by OSGi (e.g. in a servlet) you can use the jndi api to obtain the service. You must install the jndi feature. Regards Krzysztof On 22.10.2014 16:22, abdulshameer wrote: > Hi Friends, > > I just referred to your posts for installing jdbc connectivity as a separate > jndi service. I am struck in getting a referrence to this jndi service. > > 1.In jndi.xml of deploy folder, using blueprint xml tag, defined the > database profile . > 2.Osgified the ojdbc jar and installed in servicemix. > 3. Restarted the service mix, i am able to see the jndi.xml active with the > service id and name. > 4. In our application we used plain jdbc connectivity. Now we want to get > referrence to the installed jndi service to get the database connection. > > > Advance Thanks for you expertise guys. Please help me on getting referrence > from the jndi service.some example could be really helpful. > > > > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/How-to-consume-the-jndi-service-JDBC-connection-in-web-application-tp5721793.html > Sent from the ServiceMix - User mailing list archive at Nabble.com. -- Krzysztof Sobkowiak JEE & OSS Architect | Senior Solution Architect @ Capgemini | Committer @ ASF Capgemini <http://www.pl.capgemini.com/> | Software Solutions Center <http://www.pl.capgemini-sdm.com/> | Wroclaw e-mail: [email protected] <mailto:[email protected]> | Twitter: @KSobkowiak Calendar: http://goo.gl/yvsebC
