private void startExtensionActivator(ModuleRevision extensionRevision, BundleContext context) { List<Capability> metadata = extensionRevision.getCapabilities(EquinoxModuleDataNamespace.MODULE_DATA_NAMESPACE); if (metadata.isEmpty()) { return; } String activatorName = (String) metadata.get(0).getAttributes().get(EquinoxModuleDataNamespace.CAPABILITY_ACTIVATOR); if (activatorName == null) { return; } BundleActivator activator = null; try { Class<?> activatorClass = Class.forName(activatorName); activator = (BundleActivator) activatorClass.newInstance(); startActivator(activator, context, extensionRevision.getBundle()); } catch (Throwable e) { BundleException eventException; if (activator == null) { eventException = new BundleException(Msg.BundleContextImpl_LoadActivatorError, BundleException.ACTIVATOR_ERROR, e); } else { eventException = new BundleException(NLS.bind(Msg.BUNDLE_ACTIVATOR_EXCEPTION, new Object[] {activator.getClass(), "start", extensionRevision.getSymbolicName()}), BundleException.ACTIVATOR_ERROR, e); //$NON-NLS-1$ } configuration.getHookRegistry().getContainer().getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, extensionRevision.getBundle(), eventException); } }
private void startExtensionActivator(ModuleRevision extensionRevision, BundleContext context) { List<Capability> metadata = extensionRevision.getCapabilities(EquinoxModuleDataNamespace.MODULE_DATA_NAMESPACE); if (metadata.isEmpty()) { return; } String activatorName = (String) metadata.get(0).getAttributes().get(EquinoxModuleDataNamespace.CAPABILITY_ACTIVATOR); if (activatorName == null) { return; } BundleActivator activator = null; try { Class<?> activatorClass = Class.forName(activatorName); activator = (BundleActivator) activatorClass.newInstance(); startActivator(activator, context, extensionRevision.getBundle()); } catch (Throwable e) { BundleException eventException; if (activator == null) { eventException = new BundleException(Msg.BundleContextImpl_LoadActivatorError, BundleException.ACTIVATOR_ERROR, e); } else { eventException = new BundleException(NLS.bind(Msg.BUNDLE_ACTIVATOR_EXCEPTION, new Object[] {activator.getClass(), "start", extensionRevision.getSymbolicName()}), BundleException.ACTIVATOR_ERROR, e); //$NON-NLS-1$ } configuration.getHookRegistry().getContainer().getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, extensionRevision.getBundle(), eventException); } }
private void startExtensionActivator(ModuleRevision extensionRevision, BundleContext context) { List<Capability> metadata = extensionRevision.getCapabilities(EquinoxModuleDataNamespace.MODULE_DATA_NAMESPACE); if (metadata.isEmpty()) { return; } String activatorName = (String) metadata.get(0).getAttributes().get(EquinoxModuleDataNamespace.CAPABILITY_ACTIVATOR); if (activatorName == null) { return; } BundleActivator activator = null; try { Class<?> activatorClass = Class.forName(activatorName); activator = (BundleActivator) activatorClass.newInstance(); startActivator(activator, context, extensionRevision.getBundle()); } catch (Exception e) { BundleException eventException; if (activator == null) { eventException = new BundleException(Msg.BundleContextImpl_LoadActivatorError, BundleException.ACTIVATOR_ERROR, e); } else { eventException = new BundleException(NLS.bind(Msg.BUNDLE_ACTIVATOR_EXCEPTION, new Object[] {activator.getClass(), "start", extensionRevision.getSymbolicName()}), BundleException.ACTIVATOR_ERROR, e); //$NON-NLS-1$ } configuration.getHookRegistry().getContainer().getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, extensionRevision.getBundle(), eventException); } }
private void startExtensionActivator(ModuleRevision extensionRevision, BundleContext context) { List<Capability> metadata = extensionRevision.getCapabilities(EquinoxModuleDataNamespace.MODULE_DATA_NAMESPACE); if (metadata.isEmpty()) { return; } String activatorName = (String) metadata.get(0).getAttributes().get(EquinoxModuleDataNamespace.CAPABILITY_ACTIVATOR); if (activatorName == null) { return; } BundleActivator activator = null; try { Class<?> activatorClass = Class.forName(activatorName); activator = (BundleActivator) activatorClass.newInstance(); startActivator(activator, context, extensionRevision.getBundle()); } catch (Throwable e) { BundleException eventException; if (activator == null) { eventException = new BundleException(Msg.BundleContextImpl_LoadActivatorError, BundleException.ACTIVATOR_ERROR, e); } else { eventException = new BundleException(NLS.bind(Msg.BUNDLE_ACTIVATOR_EXCEPTION, new Object[] {activator.getClass(), "start", extensionRevision.getSymbolicName()}), BundleException.ACTIVATOR_ERROR, e); //$NON-NLS-1$ } configuration.getHookRegistry().getContainer().getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, extensionRevision.getBundle(), eventException); } }
private void startExtensionActivator(ModuleRevision extensionRevision, BundleContext context) { List<Capability> metadata = extensionRevision.getCapabilities(EquinoxModuleDataNamespace.MODULE_DATA_NAMESPACE); if (metadata.isEmpty()) { return; } String activatorName = (String) metadata.get(0).getAttributes().get(EquinoxModuleDataNamespace.CAPABILITY_ACTIVATOR); if (activatorName == null) { return; } BundleActivator activator = null; try { Class<?> activatorClass = Class.forName(activatorName); activator = (BundleActivator) activatorClass.newInstance(); startActivator(activator, context, extensionRevision.getBundle()); } catch (Exception e) { BundleException eventException; if (activator == null) { eventException = new BundleException(Msg.BundleContextImpl_LoadActivatorError, BundleException.ACTIVATOR_ERROR, e); } else { eventException = new BundleException(NLS.bind(Msg.BUNDLE_ACTIVATOR_EXCEPTION, new Object[] {activator.getClass(), "start", extensionRevision.getSymbolicName()}), BundleException.ACTIVATOR_ERROR, e); //$NON-NLS-1$ } configuration.getHookRegistry().getContainer().getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, extensionRevision.getBundle(), eventException); } }
private void startExtensionActivator(ModuleRevision extensionRevision, BundleContext context) { List<Capability> metadata = extensionRevision.getCapabilities(EquinoxModuleDataNamespace.MODULE_DATA_NAMESPACE); if (metadata.isEmpty()) { return; } String activatorName = (String) metadata.get(0).getAttributes().get(EquinoxModuleDataNamespace.CAPABILITY_ACTIVATOR); if (activatorName == null) { return; } BundleActivator activator = null; try { Class<?> activatorClass = Class.forName(activatorName); activator = (BundleActivator) activatorClass.newInstance(); startActivator(activator, context, extensionRevision.getBundle()); } catch (Throwable e) { BundleException eventException; if (activator == null) { eventException = new BundleException(Msg.BundleContextImpl_LoadActivatorError, BundleException.ACTIVATOR_ERROR, e); } else { eventException = new BundleException(NLS.bind(Msg.BUNDLE_ACTIVATOR_EXCEPTION, new Object[] {activator.getClass(), "start", extensionRevision.getSymbolicName()}), BundleException.ACTIVATOR_ERROR, e); //$NON-NLS-1$ } configuration.getHookRegistry().getContainer().getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, extensionRevision.getBundle(), eventException); } }
public void startExtensionActivators(BundleContext context) { // First start the hook registry activators // TODO not sure we really need these anymore HookRegistry hookRegistry = configuration.getHookRegistry(); List<ActivatorHookFactory> activatorHookFactories = hookRegistry.getActivatorHookFactories(); for (ActivatorHookFactory activatorFactory : activatorHookFactories) { BundleActivator activator = activatorFactory.createActivator(); try { startActivator(activator, context, null); } catch (Exception e) { configuration.getHookRegistry().getContainer().getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, null, e); } } // start the extension bundle activators. In Equinox we let // framework extensions define Bundle-Activator headers. ModuleWiring systemWiring = (ModuleWiring) context.getBundle().adapt(BundleWiring.class); if (systemWiring != null) { List<ModuleWire> extensionWires = systemWiring.getProvidedModuleWires(HostNamespace.HOST_NAMESPACE); for (ModuleWire extensionWire : extensionWires) { ModuleRevision extensionRevision = extensionWire.getRequirer(); startExtensionActivator(extensionRevision, context); } } }
public void startExtensionActivators(BundleContext context) { // First start the hook registry activators // TODO not sure we really need these anymore HookRegistry hookRegistry = configuration.getHookRegistry(); List<ActivatorHookFactory> activatorHookFactories = hookRegistry.getActivatorHookFactories(); for (ActivatorHookFactory activatorFactory : activatorHookFactories) { BundleActivator activator = activatorFactory.createActivator(); try { startActivator(activator, context, null); } catch (Exception e) { configuration.getHookRegistry().getContainer().getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, null, e); } } // start the extension bundle activators. In Equinox we let // framework extensions define Bundle-Activator headers. ModuleWiring systemWiring = (ModuleWiring) context.getBundle().adapt(BundleWiring.class); if (systemWiring != null) { List<ModuleWire> extensionWires = systemWiring.getProvidedModuleWires(HostNamespace.HOST_NAMESPACE); for (ModuleWire extensionWire : extensionWires) { ModuleRevision extensionRevision = extensionWire.getRequirer(); startExtensionActivator(extensionRevision, context); } } }
public void startExtensionActivators(BundleContext context) { // First start the hook registry activators // TODO not sure we really need these anymore HookRegistry hookRegistry = configuration.getHookRegistry(); List<ActivatorHookFactory> activatorHookFactories = hookRegistry.getActivatorHookFactories(); for (ActivatorHookFactory activatorFactory : activatorHookFactories) { BundleActivator activator = activatorFactory.createActivator(); try { startActivator(activator, context, null); } catch (Exception e) { configuration.getHookRegistry().getContainer().getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, null, e); } } // start the extension bundle activators. In Equinox we let // framework extensions define Bundle-Activator headers. ModuleWiring systemWiring = (ModuleWiring) context.getBundle().adapt(BundleWiring.class); if (systemWiring != null) { List<ModuleWire> extensionWires = systemWiring.getProvidedModuleWires(HostNamespace.HOST_NAMESPACE); for (ModuleWire extensionWire : extensionWires) { ModuleRevision extensionRevision = extensionWire.getRequirer(); startExtensionActivator(extensionRevision, context); } } }
public void startExtensionActivators(BundleContext context) { // First start the hook registry activators // TODO not sure we really need these anymore HookRegistry hookRegistry = configuration.getHookRegistry(); List<ActivatorHookFactory> activatorHookFactories = hookRegistry.getActivatorHookFactories(); for (ActivatorHookFactory activatorFactory : activatorHookFactories) { BundleActivator activator = activatorFactory.createActivator(); try { startActivator(activator, context, null); } catch (Exception e) { configuration.getHookRegistry().getContainer().getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, null, e); } } // start the extension bundle activators. In Equinox we let // framework extensions define Bundle-Activator headers. ModuleWiring systemWiring = (ModuleWiring) context.getBundle().adapt(BundleWiring.class); if (systemWiring != null) { List<ModuleWire> extensionWires = systemWiring.getProvidedModuleWires(HostNamespace.HOST_NAMESPACE); for (ModuleWire extensionWire : extensionWires) { ModuleRevision extensionRevision = extensionWire.getRequirer(); startExtensionActivator(extensionRevision, context); } } }
public void startExtensionActivators(BundleContext context) { // First start the hook registry activators // TODO not sure we really need these anymore HookRegistry hookRegistry = configuration.getHookRegistry(); List<ActivatorHookFactory> activatorHookFactories = hookRegistry.getActivatorHookFactories(); for (ActivatorHookFactory activatorFactory : activatorHookFactories) { BundleActivator activator = activatorFactory.createActivator(); try { startActivator(activator, context, null); } catch (Exception e) { configuration.getHookRegistry().getContainer().getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, null, e); } } // start the extension bundle activators. In Equinox we let // framework extensions define Bundle-Activator headers. ModuleWiring systemWiring = (ModuleWiring) context.getBundle().adapt(BundleWiring.class); if (systemWiring != null) { List<ModuleWire> extensionWires = systemWiring.getProvidedModuleWires(HostNamespace.HOST_NAMESPACE); for (ModuleWire extensionWire : extensionWires) { ModuleRevision extensionRevision = extensionWire.getRequirer(); startExtensionActivator(extensionRevision, context); } } }
public void startExtensionActivators(BundleContext context) { // First start the hook registry activators // TODO not sure we really need these anymore HookRegistry hookRegistry = configuration.getHookRegistry(); List<ActivatorHookFactory> activatorHookFactories = hookRegistry.getActivatorHookFactories(); for (ActivatorHookFactory activatorFactory : activatorHookFactories) { BundleActivator activator = activatorFactory.createActivator(); try { startActivator(activator, context, null); } catch (Exception e) { configuration.getHookRegistry().getContainer().getEventPublisher().publishFrameworkEvent(FrameworkEvent.ERROR, null, e); } } // start the extension bundle activators. In Equinox we let // framework extensions define Bundle-Activator headers. ModuleWiring systemWiring = (ModuleWiring) context.getBundle().adapt(BundleWiring.class); if (systemWiring != null) { List<ModuleWire> extensionWires = systemWiring.getProvidedModuleWires(HostNamespace.HOST_NAMESPACE); for (ModuleWire extensionWire : extensionWires) { ModuleRevision extensionRevision = extensionWire.getRequirer(); startExtensionActivator(extensionRevision, context); } } }