djencks wrote:
>
> I'm not sure if this reflects a bug in geronimo or not.
>
> What is happening is that, since geronimo is a managed environment,
> it finds the persistence.xml and constructs the necessary objects to
> set up managed EMF and EM instances that can be made available to
> your app through dependency injection (using @PersistenceUnit or
> @PersistenceContext annotations) or through jndi.
>
> However, your app is using techniques appropriate to unmanaged
> environments to ask openjpa to directly construct an EMF. The jta-
> datasource and non-jta-datasource elements have no standard meaning
> and in particular the geronimo meaning and openjpa meaning are
> different.
>
> To fix this you should use dependency injection such as
>
> @PersistenceContext
> private EntityManager entityManager;
>
Thanks a lot! It solved all the problems.
Br,
Maciej
--
View this message in context: http://www.nabble.com/Problem-with-persistence.xml-%28how-to-use-data-source-%29-tp16380414s134p16399049.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
|