private void registerPaymentApi(final BundleContext context) { final Dictionary props = new Hashtable(); // Same name the beatrix tests expect when using that payment plugin props.put(OSGIPluginProperties.PLUGIN_NAME_PROP, "osgi-payment-plugin"); registrar.registerService(context, PaymentPluginApiWithTestControl.class, new TestPaymentPluginApi("test"), props); } }
@Override public void start(final BundleContext context) throws Exception { // Tracked resource killbillAPI = new OSGIKillbillAPI(context); logService = new OSGIKillbillLogService(context); dataSource = new OSGIKillbillDataSource(context); dispatcher = new OSGIKillbillEventDispatcher(context); // Registrar for bundle registrar = new OSGIKillbillRegistrar(); // Killbill events final OSGIKillbillEventHandler handler = getOSGIKillbillEventHandler(); if (handler != null) { dispatcher.registerEventHandler(handler); } }
registrar.unregisterAll(); registrar = null;
@Override public void start(final BundleContext context) throws Exception { // Tracked resource killbillAPI = new OSGIKillbillAPI(context); logService = new OSGIKillbillLogService(context); dataSource = new OSGIKillbillDataSource(context); dispatcher = new OSGIKillbillEventDispatcher(context); // Registrar for bundle registrar = new OSGIKillbillRegistrar(); // Killbill events final OSGIKillbillEventHandler handler = getOSGIKillbillEventHandler(); if (handler != null) { dispatcher.registerEventHandler(handler); } }
registrar.unregisterAll(); registrar = null;
private void registerPaymentApi(final BundleContext context, final TestDao dao) { final Dictionary props = new Hashtable(); props.put(OSGIPluginProperties.PLUGIN_NAME_PROP, "test"); registrar.registerService(context, PaymentPluginApi.class, new TestPaymentPluginApi("test", dao), props); }
private void registerPaymentApi(final BundleContext context, final TestDao dao) { final Dictionary props = new Hashtable(); props.put(OSGIPluginProperties.PLUGIN_NAME_PROP, "test"); registrar.registerService(context, PaymentPluginApi.class, new TestPaymentPluginApi("test", dao), props); }