Yes .. deploying the blueprint file should work. The new commands simply create these files so there is not much difference.

You should check the status of the "bundle" representing the blueprint file. Probably it is not activated correctly. You might find the reason in the log file. If the problem is a missing blueprint service dependency then you might need to increase the log level to debug.

Christian

Am 03.02.2014 16:44, schrieb Richard Kettelerij:
With regard to accessing databases in Karaf the overal recommended way seems to be to declare a javax.sql.Datasource in Blueprint and expose it as a OSGi service so other bundles can make use of it.

This is easily done by placing the blueprint file in the /deploy directory as described by Christian on [1]. Unfortunately this doesn't work for me with Karaf 2.3.3. While the blueprint bundle is loaded correctly is doesn't seem to expose any service properties. My "osgi.jndi.service.name <http://osgi.jndi.service.name>" property isn't available in the service registry, hence other bundles can't find the datasource.

I've check this by calling 'ls <id of blueprint datasource bundle>' in the shell. This doesn't return any results.

PS: I know about the new JDBC commands in Karaf 3.0 (and Karaf 2.3.4 hopefully soon) but this is also suppose to work right?

Regards,
Richard

[1] http://www.liquid-reality.de/display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access


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

Open Source Architect
Talend Application Integration Division http://www.talend.com

Reply via email to