@Override public synchronized void stop(BundleContext context) throws Exception { bt.close(); lst.close(); super.stop(context); }
public void start(BundleContext arg0) throws Exception { super.start(arg0); // bundle context for later ServiceReference lookups ctx = arg0; // track providers as they register themselves ServiceTrackerCustomizer customizer = new PersistenceTracker(this); tracker = new ServiceTracker(ctx, PERSISTENCE_PROVIDER, customizer); tracker.open(); // configure JPA provider resolver for OSGi PersistenceProviderResolverHolder.setPersistenceProviderResolver(this); }
public void start(BundleContext arg0) throws Exception { super.start(arg0); // bundle context for later ServiceReference lookups ctx = arg0; // track providers as they register themselves ServiceTrackerCustomizer customizer = new PersistenceTracker(this); tracker = new ServiceTracker(ctx, PERSISTENCE_PROVIDER, customizer); tracker.open(); // configure JPA provider resolver for OSGi PersistenceProviderResolverHolder.setPersistenceProviderResolver(this); }
public void stop(BundleContext arg0) throws Exception { // cleanup provider tracker tracker.close(); tracker = null; // cleanup providers and remove ourselves as a JPA provider resolver PersistenceProviderResolverHolder.setPersistenceProviderResolver(null); providers.clear(); // cleanup context ctx = null; super.stop(arg0); }
public void start(BundleContext arg0) throws Exception { super.start(arg0); // bundle context for later ServiceReference lookups ctx = arg0; // track providers as they register themselves ServiceTrackerCustomizer customizer = new PersistenceTracker(this); tracker = new ServiceTracker(ctx, PERSISTENCE_PROVIDER, customizer); tracker.open(); // configure JPA provider resolver for OSGi PersistenceProviderResolverHolder.setPersistenceProviderResolver(this); }
public void stop(BundleContext arg0) throws Exception { // cleanup provider tracker tracker.close(); tracker = null; // cleanup providers and remove ourselves as a JPA provider resolver PersistenceProviderResolverHolder.setPersistenceProviderResolver(null); providers.clear(); // cleanup context ctx = null; super.stop(arg0); }
public void start(BundleContext arg0) throws Exception { super.start(arg0); // bundle context for later ServiceReference lookups ctx = arg0; // track providers as they register themselves ServiceTrackerCustomizer customizer = new PersistenceTracker(this); tracker = new ServiceTracker(ctx, PERSISTENCE_PROVIDER, customizer); tracker.open(); // configure JPA provider resolver for OSGi PersistenceProviderResolverHolder.setPersistenceProviderResolver(this); }
public void stop(BundleContext arg0) throws Exception { // cleanup provider tracker tracker.close(); tracker = null; // cleanup providers and remove ourselves as a JPA provider resolver PersistenceProviderResolverHolder.setPersistenceProviderResolver(null); providers.clear(); // cleanup context ctx = null; super.stop(arg0); }
public void start(final BundleContext bundleContext) throws Exception { locator.start(bundleContext); activation.start(bundleContext); persistence.start(bundleContext); }
@Override public synchronized void stop(BundleContext context) throws Exception { bt.close(); lst.close(); super.stop(context); }
@Override public synchronized void start(final BundleContext context) throws Exception { super.start(context); lst = new LogServiceTracker(context, LogService.class.getName(), null); lst.open(); bt = new BundleTracker(context, Bundle.ACTIVE, new CommandMapBundleTrackerCustomizer(this, context.getBundle())); bt.open(); }
public void stop(BundleContext arg0) throws Exception { // cleanup provider tracker tracker.close(); tracker = null; // cleanup providers and remove ourselves as a JPA provider resolver PersistenceProviderResolverHolder.setPersistenceProviderResolver(null); providers.clear(); // cleanup context ctx = null; super.stop(arg0); }
@Override public synchronized void start(final BundleContext context) throws Exception { super.start(context); lst = new LogServiceTracker(context, LogService.class.getName(), null); lst.open(); bt = new BundleTracker(context, Bundle.ACTIVE, new MailProviderBundleTrackerCustomizer(this, context.getBundle())); bt.open(); }
@Override public synchronized void stop(BundleContext context) throws Exception { bt.close(); lst.close(); super.stop(context); }
@Override public synchronized void start(final BundleContext context) throws Exception { super.start(context); lst = new LogServiceTracker(context, LogService.class.getName(), null); lst.open(); bt = new BundleTracker(context, Bundle.ACTIVE, new CommandMapBundleTrackerCustomizer(this, context.getBundle())); bt.open(); }
@Override public synchronized void stop(BundleContext context) throws Exception { bt.close(); lst.close(); super.stop(context); }
@Override public synchronized void start(final BundleContext context) throws Exception { super.start(context); lst = new LogServiceTracker(context, LogService.class.getName(), null); lst.open(); bt = new BundleTracker(context, Bundle.ACTIVE, new CommandMapBundleTrackerCustomizer(this, context.getBundle())); bt.open(); }
public void stop(final BundleContext bundleContext) throws Exception { persistence.stop(bundleContext); activation.stop(bundleContext); locator.stop(bundleContext); } }