Hello,
I am struggling with implementing some basic persistence as a service in Karaf using Hibernate.
I started with an example where all the hibernate annotated classes were contained in a "dto" folder which was part of the feature's bundle. I exported the dto package and everything worked fine.
My ultimate goal is to have several features that implement persistence using Hibernate. I would prefer to keep the dto classes where they are, in a library external to all the hibernate enabled features. I ran into issues when I tried to have two separate bundles manage different DTO files contained in the same package within an external library. It appears that the second kar loaded is wired to the first, since it exports the classes in this package.
I also have a need to provide the database properties that are typically in persistence.xml from an external file. I understand how to do this with blueprint, but it requires that I make each property part of the bean. Is there a way to load all the properties from an external file and use them to create the EntityManager instance?
Thanks
|