Martin Neimeier commented on New Feature HHH-7527

The problem with 3) is that in osgi, a bundle A, which needs class X from bundle B, needs to import the package containing class X and bundle B needs to export that package. As far as I know, there is only one exception .. bundle fragements.
A bundle fragment is attached to the host bundle (or host bundles). It is treated as part of the host bundle (it uses the classloader of the host bundle and doesn't have his own classloader; the manifest headers from the fragment bundle are merged into the manifest headers of the host bundle). Fragment bundles are normally used to bundles with resources, classes, and permitted headers if it there is no other option.

From that point of view, we could simply start with the following (if all other options are not feasible):

  • Make hibernate-core a normal bundle with all needed Export-Package, Import-Package, Private-Package statements.
  • Make the other jars (entitymanager, envers, c3p0, proxool, ehcache and infinispan) bundle fragments which attach to hibernate-core. They only add the needed Export-Package, Import-Package, Private-Package statements (except the imports for hibernate-core, because they are not needed)

We have to check if this approach solve all the problems, but it is a basis for discussions.

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