@Services(provides = @ProvideService(InstanceService.class))
public class Activator extends BaseActivator {
@Override
protected void doStart() throws Exception {
InstanceService instanceService = new InstanceServiceImpl();
register(InstanceService.class, instanceService);
InstancesMBeanImpl mbean = new InstancesMBeanImpl(instanceService);
registerMBean(mbean, "type=instance");
}