killbill-platform icon indicating copy to clipboard operation
killbill-platform copied to clipboard

Set thread contextClassLoader to the one from the bundle when activating a bundle

Open pierre opened this issue 11 years ago • 2 comments

See https://github.com/killbill/killbill-platform/issues/5.

pierre avatar Apr 24 '15 19:04 pierre

Unfortunately this is not solvable because we don't have the class loader available before we start the bundle (and enter the Felix machine), and when we hit the start method from the activator, this is too late-- we are already in the plugin.

Looks like the solution is to set that context class loader in the plugin itself but that requires to be done in each plugin (or at least the subset that need it for their start sequence to happen correctly).

There is a SO thread on that topic (http://stackoverflow.com/questions/2198928/better-handling-of-thread-context-classloader-in-osgi)

sbrossie avatar Apr 29 '15 00:04 sbrossie

Looks like the solution is to set that context class loader in the plugin itself but that requires to be done in each plugin (or at least the subset that need it for their start sequence to happen correctly).

For reference, the only plugin that requires it today is Forte.

pierre avatar Apr 29 '15 02:04 pierre