/** * @param osgiDeployable The OSGi deployable * @param bundle Its associated Bundle to start */ protected void startBundle(OSGiDeployable osgiDeployable, Bundle bundle) { if (osgiDeployable.isStart()) { try { // Compute the options // Always respect the bundle's activation policy int options = Bundle.START_ACTIVATION_POLICY; // Enable transient bundle if required if (osgiDeployable.isStartTransient()) { options |= Bundle.START_TRANSIENT; } // Start the bundle with the options bundle.start(options); } catch (BundleException e) { logger.error("Cannot start the bundle ''{0}''.", osgiDeployable, e); } } }
/** * @param osgiDeployable The OSGi deployable * @param bundle Its associated Bundle to start */ protected void startBundle(OSGiDeployable osgiDeployable, Bundle bundle) { if (osgiDeployable.isStart()) { try { // Compute the options // Always respect the bundle's activation policy int options = Bundle.START_ACTIVATION_POLICY; // Enable transient bundle if required if (osgiDeployable.isStartTransient()) { options |= Bundle.START_TRANSIENT; } // Start the bundle with the options bundle.start(options); } catch (BundleException e) { logger.error("Cannot start the bundle ''{0}''.", osgiDeployable, e); } } }