Example #1
0
 /** {@inheritDoc} */
 @Override
 public void stop(@Nonnull BundleContext context) throws Exception {
   PLUGIN = null;
   bundleContext = null;
   persistenceServiceTracker.close();
   metaDataServiceTracker.close();
   writerServiceTracker.close();
   _genericServiceTracker.close();
 }
Example #2
0
  /**
   * @return The meta data reader service
   * @throws OsgiServiceUnavailableException
   */
  public IMetaDataReader getMetaDataReaderService() throws OsgiServiceUnavailableException {

    IMetaDataReader service = (IMetaDataReader) metaDataServiceTracker.getService();
    if (service == null) {
      throw new OsgiServiceUnavailableException("Meta data reader service unavailable.");
    }

    return service;
  }
Example #3
0
  /** {@inheritDoc} */
  @Override
  public void start(@Nonnull BundleContext context) throws Exception {

    LOG.info("Jms2Ora is starting.");

    PLUGIN = this;
    bundleContext = context;

    _genericServiceTracker =
        new GenericServiceTracker<ISessionService>(context, ISessionService.class);
    _genericServiceTracker.open();

    metaDataServiceTracker = new MetaDataReaderServiceTracker(context);
    metaDataServiceTracker.open();

    persistenceServiceTracker = new MessagePersistenceServiceTracker(context);
    persistenceServiceTracker.open();

    writerServiceTracker = new MessageWriterServiceTracker(context);
    writerServiceTracker.open();
  }