hello,
I'm currently working on software to represent a JPA Annotated Model. The program needs a JAR-file, with the annotated classes, as input. The JAR-file also contains the persistence.xml for that model.
It's no problem to iterate the JAR and put all the classes to the classpath dynamically.
But the problem is the persistence
unit: My question is ambiguous:
1) is there a way to use the persistence.xml file from the JAR with the persistence unit description in my program?
2) can you add dynamically annotated entities to a Persistence Unit without using Hibernate? So that I can use one persistence unit and just add all classfiles from the jar to it.
PS. I'm using Toplink essentials as JPA implementation, but I've tried it with EclipseLink and OpenJPA as well.
Jonas Wille