Steve Ebersole commented on New Feature HHH-7527

WRT to proof-of-concept...

Unfortunately there are still some pretty big open questions. So I am not totally sure how this was supposed to tie in with Hibernate's service registry building; not sure what Martin had planned there exactly if he had an clear cut plan for those specifics. Anyway, here I will quote the discussions he and I had about the proof-of-concept...

From Martin:

I have created a first version of a classloader which should be registered
for all the "interested" bundles. So there would be x classloaders: One
for each interested bundle (a OsgiBundleClassLoaderServiceImpl) and one
"super" classloader (OsgiClassLoaderServiceImpl) which encapsulate the
Bundle-Classloaders and is responsible for the dynamic part (react on
bundles and services when they come and go).
The "super classloader" can then registered with hibernate to help with
classloading.

...

Next step is to create the BundleActivator which initiates the
scanning,etc. and is responsible for registering/unregistering
services/bundles with hibernate. I will start with: I am interested in
services which implement org.hibernate.service.Service to show my intended
direction.

To which I replied:

Couple of observations:

1) This notion of bundles "going away" (HibernateBundleActivator.serviceChanged -> OsgiClassLoaderService.unregisterBundle) is really going to end up having bad consequences in reality if that thing going away is used by Hibernate. Think we might want to be a little more proactive in warning about that.
2) Its not really just org.hibernate.service.Service that we want HibernateBundleActivator watching for. Not sure if that was just a quick swab. It is much more than that. We can talk about those specifics as we move forward.
3) Not understanding why there is both OsgiClassLoaderServiceImpl and OsgiBundleClassLoaderServiceImpl.
4) How are you expecting that which ever ClassLoaderService impl above is "real" gets registered to the Hibernate BootstrapServiceRegistry?

Other than these I think I see what you are doing here. The big questions I guess are (a) how the ClassLoaderService impl gets hooked in to BootstrapServiceRegistry and (b) what we actually look for in the bundles.

This is basically where we last heard from Martin. He did respond that he agreed about the problems of bundles going away; essentially we will just have to be as proactive as we can be to warn users when this happens. But the 2 big questions at the end of my response were never addressed. So not exactly sure where to go with that.

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