Steve Ebersole commented on New Feature HHH-7527

I think the interview with me that you pointed to lays it out pretty well. There, I broke it down into 2 pieces:

  1. classloading - in terms of how Hibernate interacts with ClassLoader}}s for loading classes, locating resources and handling {{java.util.ServiceLoader lookups. How all those things happen is very different depending upon the deployment environment; and this is one of the things that used to make Hibernate difficult to use in osgi environments. The pieces are all there for this to work nicely in osgi environments because the ClassLoader-interaction code is completely swappable since 4.0 (more or less). However, it is up to the environment to completely redefine this behavior for Hibernate.
  2. osgi manifests/metadata - in terms of Hibernate defining its osgi metadata (imports/exports/etc). This is not at all done.

So what we had been discussing with Martin was addressing:

  • defining the needed manifests/metadata
  • making the ClassLoader-interaction code a little more osgi-friendly using a whiteboard pattern wherein bundles (persistence units, etc) could register their ClassLoader with the "white board registry" and Hibernate would somehow pick that up. Martin and I had some discussions about this on the dev mailing list (and maybe some direct emails too, I'd have to check). It is probably worthwhile for me to summarize those here and attach the snippets he and I had worked out so far...
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