1 package org
.argeo
.slc
.detached
;
3 import java
.util
.Properties
;
5 import org
.argeo
.slc
.detached
.drivers
.AbstractDriver
;
6 import org
.osgi
.framework
.BundleContext
;
7 import org
.osgi
.framework
.ServiceReference
;
9 public class SimpleDetachedActivator
extends AbstractDetachedActivator
{
10 private AbstractDriver driver
;
12 protected void startAutoBundle(BundleContext context
) throws Exception
{
13 Object obj
= getStaticRefProvider().getStaticRef("slcDetached.driver");
15 driver
= (AbstractDriver
) obj
;
17 throw new DetachedException("Could not find driver.");
19 DetachedExecutionServer executionServer
= null;
20 ServiceReference ref
= context
21 .getServiceReference(DetachedExecutionServer
.class.getName());
23 executionServer
= (DetachedExecutionServer
) context
.getService(ref
);
25 throw new DetachedException("Could not find execution server.");
26 driver
.setExecutionServer(executionServer
);
29 context
.registerService(DetachedDriver
.class.getName(), driver
,
33 protected void stopAutoBundle(BundleContext context
) throws Exception
{