Hi all,
I have a problem with Aries JPA and OpenJPA.
My bundle uses container managed persistence. It defines a
persistence.xml and it is picked up by the aries jpa container which
published a service for the EntitiyManagerFactory.
I inject the EntityManager using blueprint like in the Trader example.
The problem is that the blueprint integration looks for another OSGi
service than the container provides.
This is what the bundle searches for:
----
2012-01-13 09:02:21,001 | INFO | rint Extender: 3 |
BlueprintContainerImpl | container.BlueprintContainerImpl 305
| 9 - org.apache.aries.blueprint - 0.3.1 | Bundle db-examplejpa is
waiting for dependencies [(&(&(org.apache.aries
.jpa.proxy.factory=true)(osgi.unit.name=person))(objectClass=javax.persistence.EntityManagerFactory))]
----
And this is what the bundle provides:
db-examplejpa (68) provides:
----------------------------
objectClass = javax.persistence.EntityManagerFactory
org.apache.aries.jpa.container.managed = true
org.apache.aries.jpa.default.unit.name = false
osgi.unit.name = person
osgi.unit.provider = org.apache.openjpa.persistence.PersistenceProviderImpl
osgi.unit.version = 2.1.1
service.id = 216
-----
So it seem the property "org.apache.aries.jpa.proxy.factory=true" is
missing. So the service can not be bound.
Any ideas how I can solve this?
Here is my complete project:
https://github.com/cschneider/Karaf-Tutorial/tree/master/db/examplejpa
Christian
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com