I am not sure what your code intends to do. What does the annotation @JPA mean? If you want to use a DataSource in DS then simply inject it.
@Reference(osgi.jndi.service.name=jpatest) DataSource myDataSource; Btw. I just recently learned that you can use a config admin property to change the filter above at runtime. Christian 2016-03-19 14:31 GMT+01:00 Morgan <[email protected]>: > Hi guys, > > For karaf-boot I'm working on the JPA annotations and it's close to be > done but atm I'm working on a example to show how it works but I'm stuck at > the "service tracking" part using DS. > > The purpose is to start the bundle when a datasource "jdbc/test" is found. > > When I drop my datasource in the deploy folder the logs seems to find the > datasource and his jndi reference like shown : > > 2016-03-15 18:32:07,965 | DEBUG | f-4.0.4.2/deploy | ServiceRecipe > | 13 - org.apache.aries.blueprint.core - 1.5.0 | Registering > service .component-1 with interfaces [javax.sql.DataSource] and properties > {osgi.service.blueprint.compname=dataSource, osgi.jndi.service.name=jdbc/test} > > > This is my class and my datasource: > > https://gist.github.com/mhautman/f58afa1151f6d5d59f2f > > I guess I did something wrong somewhere but I don't know where to search > anymore... I already read the specs too.. > > Regards, > Morgan > -- -- Christian Schneider http://www.liquid-reality.de <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de> Open Source Architect http://www.talend.com <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>
