|
|
|
|
|
|
Re: Equinox hooks removed in Luna [message #1443971 is a reply to message #1443941] |
Mon, 13 October 2014 13:38 |
Sébastien Gandon Messages: 184 Registered: July 2009 |
Senior Member |
|
|
Ok I' think I'll use the org.eclipse.osgi.internal.hookregistry.ClassLoaderHook, the main method I was using is the addClassPathEntry which is still there.
I have one more question though, how can I get the bundleContext from my "org.eclipse.osgi.internal.hookregistry.HookConfigurator" implementation because I need to register an OSGI service (the class lies in a org.eclipse.osgi fragment).
In my previous implementation I was registering an AdaptorHook which does not exist anymore ?
[Updated on: Mon, 13 October 2014 13:39] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Equinox hooks removed in Luna [message #1444782 is a reply to message #1444705] |
Tue, 14 October 2014 14:47 |
Sébastien Gandon Messages: 184 Registered: July 2009 |
Senior Member |
|
|
Ok I got it.
I have another problem.
In 3.6, the hook was called when the one of the class or resource was being loaded in the inner jar, or I just discovered that in 4.4 that my hook gets called during some early OSGI initialization phase, where it is looking for some i18n resource : OSGI-INF/l10n/bundle.properties .
The thing is that I really need to know in my hook that it is called from our actual code activation and not some internal resolution ?
My hook eventually ask the user to accept some license before downloading the library and should therefore be delayed when the actual inner jar is needed to be used.
I have tried to create the searched file (OSGI-INF/l10n/bundle.properties) but the hook gets called anyway.
Do you have any idea ?
Thanks.
here is the stack trace
org.talend.osgi.hook.JarLoaderClassLoadingHook.addClassPathEntry(java.util.ArrayList<org.eclipse.osgi.internal.loader.classpath.ClasspathEntry>, java.lang.String, org.eclipse.osgi.internal.loader.classpath.ClasspathManager, org.eclipse.osgi.storage.BundleInfo.Generation) line: 92
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassPathEntry(java.util.ArrayList<org.eclipse.osgi.internal.loader.classpath.ClasspathEntry>, java.lang.String, org.eclipse.osgi.internal.loader.classpath.ClasspathManager, org.eclipse.osgi.storage.BundleInfo.Generation) line: 173
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.buildClasspath(java.lang.String[], org.eclipse.osgi.internal.loader.classpath.ClasspathManager, org.eclipse.osgi.storage.BundleInfo$Generation) line: 154
org.eclipse.osgi.internal.loader.classpath.ClasspathManager.<init>(org.eclipse.osgi.storage.BundleInfo$Generation, org.eclipse.osgi.internal.loader.ModuleClassLoader) line: 83
org.eclipse.osgi.internal.loader.EquinoxClassLoader.<init>(java.lang.ClassLoader, org.eclipse.osgi.internal.framework.EquinoxConfiguration, org.eclipse.osgi.internal.loader.BundleLoader, org.eclipse.osgi.storage.BundleInfo$Generation) line: 57
org.eclipse.osgi.internal.loader.BundleLoader.createClassLoaderPrivledged(java.lang.ClassLoader, org.eclipse.osgi.internal.framework.EquinoxConfiguration, org.eclipse.osgi.internal.loader.BundleLoader, org.eclipse.osgi.storage.BundleInfo.Generation, java.util.List<org.eclipse.osgi.internal.hookregistry.ClassLoaderHook>) line: 268
org.eclipse.osgi.internal.loader.BundleLoader.getModuleClassLoader() line: 225
org.eclipse.osgi.internal.loader.BundleLoader.findEntries(java.lang.String, java.lang.String, int) line: 761
org.eclipse.osgi.container.ModuleWiring.findEntries(java.lang.String, java.lang.String, int) line: 285
org.eclipse.osgi.storage.ManifestLocalization.findResource(java.lang.String) line: 183
org.eclipse.osgi.storage.ManifestLocalization.lookupResourceBundle(java.lang.String) line: 126
org.eclipse.osgi.storage.ManifestLocalization.getResourceBundle(java.lang.String, boolean) line: 102
org.eclipse.osgi.storage.BundleInfo$Generation.getResourceBundle(java.lang.String) line: 133
org.eclipse.osgi.storage.BundleLocalizationImpl.getLocalization(org.osgi.framework.Bundle, java.lang.String) line: 40
org.eclipse.core.internal.runtime.Activator.getLocalization(org.osgi.framework.Bundle, java.lang.String) line: 241
org.eclipse.core.internal.runtime.ResourceTranslator.getResourceBundle(org.osgi.framework.Bundle, java.lang.String) line: 69
org.eclipse.core.internal.runtime.ResourceTranslator.getResourceBundle(org.osgi.framework.Bundle) line: 61
org.eclipse.core.internal.registry.osgi.EclipseBundleListener.addBundle(org.osgi.framework.Bundle, boolean) line: 174
org.eclipse.core.internal.registry.osgi.EclipseBundleListener.processBundles(org.osgi.framework.Bundle[]) line: 90
org.eclipse.core.internal.registry.osgi.EquinoxRegistryStrategy(org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI).onStart(org.eclipse.core.runtime.IExtensionRegistry, boolean) line: 224
org.eclipse.core.internal.registry.ExtensionRegistry.<init>(org.eclipse.core.runtime.spi.RegistryStrategy, java.lang.Object, java.lang.Object) line: 725
org.eclipse.core.runtime.RegistryFactory.createRegistry(org.eclipse.core.runtime.spi.RegistryStrategy, java.lang.Object, java.lang.Object) line: 58
org.eclipse.core.internal.registry.osgi.Activator.startRegistry() line: 137
org.eclipse.core.internal.registry.osgi.Activator.start(org.osgi.framework.BundleContext) line: 56
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06351 seconds