access to META-INFO/persistence.xml from required plugin [message #436608] |
Tue, 13 September 2005 20:53 |
John J. Franey Messages: 55 Registered: July 2009 |
Member |
|
|
My plugin requires a plugin that contains hibernate's entity manager, some pojos mapped to tables, and a persistence.xml file.
The required plugin exports hibernate's entity manager classes and the POJO classes. The entity manager classes, the pojo classes and a 'persistence.xml' file are archived into a jar file in the required plugin.
In my plugin, a class uses the entity manager factory interface to obtain an entity manager. This should cause the entity manager factory to look through the classpath for the persistence.xml file. However, it fails to resolve the named entity manager; so my guess is that it is failing to find the persistence.xml file.
My plugin successfully instantiates other classes from the required plugin, and successfully invokes the entity manager factory methods. I don't doubt that the required plugin is correctly exporting these classes.
How does a required plugin export files that reside in META-INF directory? Does the 'Export-Package' directive in OSGi allow me to export this file? Is there another OSGi directive to use?
On the other hand, maybe I screwed something up. The Eclipse FAQ discusses the class loader mechanism but as it relates to java class files. Why shouldn't it work the same way for config files in META-INF?
Thanks,
John
|
|
|
Powered by
FUDForum. Page generated in 0.03190 seconds