tcrisera wrote
> Thanks for your reply.   I suppose I should explain why my manager had me
> look into this.   We wanted to know if we could have a dao project with
> generic JPA entity classes.   Then if we were going to build a web project
> that was going to specifically use OpenJPA as the provider, could pull in
> the dao project as a dependency in the Maven build and enhance the entity
> objects at that time.

If you are using standard features of JPA (nothing fancy-vendor specific),
than the changes in persistence.xml and pom.xml from say Hibernate to
OpenJpa to EclipseLink are rather trivial.

If you ARE using some vendor extensions, then you would probably have to
alter the entities and DAOs as well.


tcrisera wrote
> I had the impression that the persistence.xml was used at build time from
> this statement in the 2.2 pdf documentation.  (Under 5.2.1. Enhancing at
> Build Time)
> "If you do not supply any arguments to the enhancer, it will run on the
> classes in your persistent class list (see Section 5.1, “Persistent Class
> List ” [260]). You must, however, supply the classpath you wish the
> enhancer to run with. This classpath must include, at minimum, the openjpa
> jar(s), persistence.xml and the target classes. "  
> I thought that list included any jars defined in persistence.xml.

Well I guess the documentation is right, I was talking from my experience
(and from my faulted memory :)). For sure it is much easier to have
persistence.xml and static enhancing in the same project.




--
View this message in context: 
http://openjpa.208410.n2.nabble.com/Build-time-Enhancement-Maven-dependencies-persistence-xml-tp7581599p7581643.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to