Hi all,
I just retested today and it works..
I must have missed something.. sorry for the trouble.
Regards,
Morgan
On 2016-03-20 17:32, Jean-Baptiste Onofré wrote:
Hi Morgan,
yes, I know (as it was we discussed): I just explained for the others ;)
I gonna take a look on your code.
Regards
JB
On 03/20/2016 11:17 AM, Morgan wrote:
Hey guys,
To be clear , the @JPA annotation does generate the persistence.xml
during compile time.
That was the purpose of the new @JPA annotation.
The question was indeed on the service reference.
The purpose is to execute the bundle when a datasource x is recognized
by the service registry. (like a servicetracker)
Regards,
Morgan
On 2016-03-20 08:59, Jean-Baptiste Onofré wrote:
Hi guys,
I think the purpose of @jpa annotation is not "only" the datasource.
The @jpa annotation should also define additional attribute like the
provider.
Thanks to that, karaf-boot will be able to generate the
persistence.xml and additional resources more than the datasource.
IMHO, regarding the current issue, it sounds like a service reference
mismatch (probably on the filter).
I gonna take a look.
On 03/19/2016 06:49 PM, Christian Schneider wrote:
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
<http://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 <morgan.haut...@gmail.com
<mailto:morgan.haut...@gmail.com>>:
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
<http://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>