First of all thanks for making hibernate works in OSGi.
I've OSGi-fied some hibernate bundle a while ago, the main problem I encountered is the split package issue(same packages used by different bundles). For example, both hibernate-core and hibernate-annotations share some package, also hibernate-core and hibernate-entitymanager share some package. To resolve this problem in OSGi container, I create hibernate-annotations and hibernate-entitymanager as fragment bundle, attach those to hibernate-core(hibernate-core play the role as host bundle), so all resource in fragment bundle is available for host bundle.
I know it's just a workaround, the ideal clean solution should refactor Hibernate to remove any split package between modules, also resolve any potential classloading issue in OSGi.
Anyway, I will append the projects I created, it basically use maven-bundle-plugin and maven-shade-plugin to add OSGi metadata headers to each jar. Those projects works for my scenario in Karaf/Fuse ESB with Aries JPA.
Best Regards
Freeman
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Hi Team,
First of all thanks for making hibernate works in OSGi.
I've OSGi-fied some hibernate bundle a while ago, the main problem I encountered is the split package issue(same packages used by different bundles). For example, both hibernate-core and hibernate-annotations share some package, also hibernate-core and hibernate-entitymanager share some package. To resolve this problem in OSGi container, I create hibernate-annotations and hibernate-entitymanager as fragment bundle, attach those to hibernate-core(hibernate-core play the role as host bundle), so all resource in fragment bundle is available for host bundle.
I know it's just a workaround, the ideal clean solution should refactor Hibernate to remove any split package between modules, also resolve any potential classloading issue in OSGi.
Anyway, I will append the projects I created, it basically use maven-bundle-plugin and maven-shade-plugin to add OSGi metadata headers to each jar. Those projects works for my scenario in Karaf/Fuse ESB with Aries JPA.
Best Regards
Freeman