ServiceName serviceCreateName = ServicesServices.serviceCreateRubyService( unit, serviceMetaData.getName() );
ServiceName serviceStartName = ServicesServices.serviceStartRubyService( unit, serviceMetaData.getName() );
RubyService service = new RubyService( serviceMetaData.getName() );
RubyServiceCreate serviceCreate = new RubyServiceCreate( service );
ServiceBuilder<RubyService> builderCreate = phaseContext.getServiceTarget().addService( serviceCreateName, serviceCreate );
builderCreate.addDependency( ServicesServices.serviceComponentResolver( unit, serviceMetaData.getName() ), ComponentResolver.class, serviceCreate.getComponentResolverInjector() );
builderCreate.addDependency( CoreServices.runtimePoolName( unit, "services" ), RestartableRubyRuntimePool.class, serviceCreate.getRubyRuntimePoolInjector() );
builderCreate.setInitialMode( Mode.PASSIVE );
builderCreate.install();
RubyServiceStart serviceStart = new RubyServiceStart();
ServiceBuilder<RubyService> builderStart = phaseContext.getServiceTarget().addService( serviceStartName, serviceStart );