[
https://issues.apache.org/jira/browse/FELIX-2197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219319#comment-13219319
]
Richard S. Hall commented on FELIX-2197:
----------------------------------------
I assume we can close this now that we have R4.3 class weaving hooks?
> Please implement something like Equinox's
> org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook
> ---------------------------------------------------------------------------------------------
>
> Key: FELIX-2197
> URL: https://issues.apache.org/jira/browse/FELIX-2197
> Project: Felix
> Issue Type: New Feature
> Components: Framework
> Affects Versions: framework-2.0.4
> Environment: irrelevant
> Reporter: Martin Zdila
> Attachments: framework.patch
>
>
> Please implement something like Equinox's
> org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook. We need it for running
> Felix under Terracotta (there is HOWTO for Equinox:
> http://www.terracotta.org/confluence/display/wiki/Run+with+Eclipse+Equinox).
> We patched the Felix Framework for the workaround. The patch is attached. We
> use it like this:
> ...
> import org.apache.felix.framework.ClassLoaderHook;
> import org.apache.felix.framework.Felix;
> import com.tc.object.bytecode.hook.impl.ClassProcessorHelper;
> import com.tc.object.loaders.NamedClassLoader;
> ...
> final Properties properties = new Properties();
> ...
> properties.put("classLoaderHook", new ClassLoaderHook() {
> @Override
> public void classLoaderCreared(final ClassLoader classLoader) {
> if (classLoader instanceof NamedClassLoader) {
> ((NamedClassLoader)
> classLoader).__tc_setClassLoaderName(classLoader.toString());
>
> ClassProcessorHelper.registerGlobalLoader((NamedClassLoader) classLoader,
> null);
> }
> }
> });
>
> return new Felix(properties);
> ...
> Thanks in advance.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira