@Override public synchronized void start(BundleContext bundleContext) throws Exception { // This is how we replace the default FactoryFinder strategy // with one that is more compatible in an OSGi env. FactoryFinder.setObjectFactory(this); debug("activating"); this.bundleContext = bundleContext; cachePackageCapabilities(Service.class, Transport.class, DiscoveryAgent.class, PersistenceAdapter.class); debug("checking existing bundles"); bundleContext.addBundleListener(this); for (Bundle bundle : bundleContext.getBundles()) { if (bundle.getState() == Bundle.RESOLVED || bundle.getState() == Bundle.STARTING || bundle.getState() == Bundle.ACTIVE || bundle.getState() == Bundle.STOPPING) { register(bundle); } } debug("activated"); }
public synchronized void start(BundleContext bundleContext) throws Exception { // This is how we replace the default FactoryFinder strategy // with one that is more compatible in an OSGi env. FactoryFinder.setObjectFactory(this); debug("activating"); this.bundleContext = bundleContext; debug("checking existing bundles"); bundleContext.addBundleListener(this); for (Bundle bundle : bundleContext.getBundles()) { if (bundle.getState() == Bundle.RESOLVED || bundle.getState() == Bundle.STARTING || bundle.getState() == Bundle.ACTIVE || bundle.getState() == Bundle.STOPPING) { register(bundle); } } debug("activated"); }
@Override public synchronized void start(BundleContext bundleContext) throws Exception { // This is how we replace the default FactoryFinder strategy // with one that is more compatible in an OSGi env. FactoryFinder.setObjectFactory(this); debug("activating"); this.bundleContext = bundleContext; cachePackageCapabilities(Service.class, Transport.class, DiscoveryAgent.class, PersistenceAdapter.class); debug("checking existing bundles"); bundleContext.addBundleListener(this); for (Bundle bundle : bundleContext.getBundles()) { if (bundle.getState() == Bundle.RESOLVED || bundle.getState() == Bundle.STARTING || bundle.getState() == Bundle.ACTIVE || bundle.getState() == Bundle.STOPPING) { register(bundle); } } debug("activated"); }
@Override public synchronized void start(BundleContext bundleContext) throws Exception { // This is how we replace the default FactoryFinder strategy // with one that is more compatible in an OSGi env. FactoryFinder.setObjectFactory(this); debug("activating"); this.bundleContext = bundleContext; cachePackageCapabilities(Service.class, Transport.class, DiscoveryAgent.class, PersistenceAdapter.class); debug("checking existing bundles"); bundleContext.addBundleListener(this); for (Bundle bundle : bundleContext.getBundles()) { if (bundle.getState() == Bundle.RESOLVED || bundle.getState() == Bundle.STARTING || bundle.getState() == Bundle.ACTIVE || bundle.getState() == Bundle.STOPPING) { register(bundle); } } debug("activated"); }
@Override public synchronized void start(BundleContext bundleContext) throws Exception { // This is how we replace the default FactoryFinder strategy // with one that is more compatible in an OSGi env. FactoryFinder.setObjectFactory(this); debug("activating"); this.bundleContext = bundleContext; cachePackageCapabilities(Service.class, Transport.class, DiscoveryAgent.class, PersistenceAdapter.class); debug("checking existing bundles"); bundleContext.addBundleListener(this); for (Bundle bundle : bundleContext.getBundles()) { if (bundle.getState() == Bundle.RESOLVED || bundle.getState() == Bundle.STARTING || bundle.getState() == Bundle.ACTIVE || bundle.getState() == Bundle.STOPPING) { register(bundle); } } debug("activated"); }