}
} ).toString();
ServiceName serviceName = unit.getServiceName();
RubyApplication application = new RubyApplication();
application.setEnvironmentName( rubyAppMetaData.getEnvironmentName() );
application.setRootPath( rubyAppMetaData.getRoot().getAbsolutePath() );
application.setName( rubyAppMetaData.getApplicationName() );
ServiceName mbeanServiceName = serviceName.append( "mbean" );
MBeanRegistrationService<RubyApplicationMBean> mbeanService = new MBeanRegistrationService<RubyApplicationMBean>( mbeanName, mbeanServiceName, new ImmediateValue<RubyApplicationMBean>( application ) );
phaseContext.getServiceTarget().addService( mbeanServiceName, mbeanService )
.addDependency( DependencyType.OPTIONAL, MBeanServerService.SERVICE_NAME, MBeanServer.class, mbeanService.getMBeanServerInjector() )