serviceTarget.addService(referenceFactoryServiceName, referenceFactoryService)
.addDependency(adminObjectServiceName, Object.class, referenceFactoryService.getDataSourceInjector())
.setInitialMode(ServiceController.Mode.ACTIVE).install();
final ContextNames.BindInfo bindInfo = ContextNames.bindInfoFor(jndi);
final BinderService binderService = new BinderService(bindInfo.getBindName());
final ServiceName binderServiceName = bindInfo.getBinderServiceName();
serviceTarget
.addService(binderServiceName, binderService)
.addDependency(referenceFactoryServiceName, ManagedReferenceFactory.class,
binderService.getManagedObjectInjector())
.addDependency(bindInfo.getParentContextServiceName(), ServiceBasedNamingStore.class,
binderService.getNamingStoreInjector()).addListener(new AbstractServiceListener<Object>() {
public void transition(final ServiceController<? extends Object> controller, final ServiceController.Transition transition) {
switch (transition) {
case STARTING_to_UP: {
DEPLOYMENT_CONNECTOR_LOGGER.boundJca("AdminObject", jndi);