Buggy code:
public final class EndpointService implements Service < Endpoint > { private static final ServiceName MBEAN_SERVER_NAME = JBOSS . append ( "mbean" , "server" ) ; private final Endpoint endpoint ; private final ServiceName name ; private final InjectedValue < SecurityDomainContext > securityDomainContextValue = new InjectedValue < SecurityDomainContext > ( ) ; private final InjectedValue < MBeanServer > mBeanServerValue = new InjectedValue < MBeanServer > ( ) ; private final InjectedValue < EJBViewMethodSecurityAttributesService > ejbMethodSecurityAttributeServiceValue = new InjectedValue < EJBViewMethodSecurityAttributesService > ( ) ; private EndpointService ( final Endpoint endpoint , final ServiceName name ) { } @ Override public Endpoint getValue ( ) { } public static ServiceName getServiceName ( final DeploymentUnit unit , final String endpointName ) { } @ Override public void start ( final StartContext context ) throws StartException { } @ Override public void stop ( final StopContext context ) { } private void registerEndpoint ( final Endpoint ep ) { } private void unregisterEndpoint ( final Endpoint ep ) { } private void registerRecordProcessor ( final RecordProcessor processor , final Endpoint ep ) { } private void unregisterRecordProcessor ( final RecordProcessor processor , final Endpoint ep ) { } public Injector < SecurityDomainContext > getSecurityDomainContextInjector ( ) { } public Injector < MBeanServer > getMBeanServerInjector ( ) { } public Injector < EJBViewMethodSecurityAttributesService > getEJBMethodSecurityAttributeServiceInjector ( ) { } public static void install ( final ServiceTarget serviceTarget , final Endpoint endpoint , final DeploymentUnit unit ) { final ServiceName serviceName = EndpointService . getServiceName ( unit , endpoint . getShortName ( ) ) ; final String propContext = endpoint . getName ( ) . getKeyProperty ( SEPID_PROPERTY_CONTEXT ) ; final String propEndpoint = endpoint . getName ( ) . getKeyProperty ( SEPID_PROPERTY_ENDPOINT ) ; final StringBuilder context = new StringBuilder ( Endpoint . SEPID_PROPERTY_CONTEXT ) . append ( "=" ) . append ( propContext ) ; final EndpointService service = new EndpointService ( endpoint , serviceName ) ; final ServiceBuilder < Endpoint > builder = serviceTarget . addService ( serviceName , service ) ; final ServiceName alias = ENDPOINT_SERVICE . append ( context . toString ( ) ) . append ( propEndpoint ) ; builder . addAliases ( alias ) ; builder . addDependency ( REQUIRED , SERVICE_NAME . append ( EndpointService . getDeploymentSecurityDomainName ( endpoint ) ) , SecurityDomainContext . class , service . getSecurityDomainContextInjector ( ) ) ; builder . addDependency ( REQUIRED , CONFIG_SERVICE ) ; builder . addDependency ( OPTIONAL , EndpointService . MBEAN_SERVER_NAME , MBeanServer . class , service . getMBeanServerInjector ( ) ) ; if ( JAXWS_EJB3 . equals ( endpoint . getType ( ) ) ) { <START_BUG> builder . addDependency ( REQUIRED , EndpointService . getEJBViewMethodSecurityAttributesServiceName ( unit , endpoint ) , EJBViewMethodSecurityAttributesService . class , service . getEJBMethodSecurityAttributeServiceInjector ( ) ) ; <END_BUG> } builder . setInitialMode ( ACTIVE ) ; builder . install ( ) ; } public static void uninstall ( final Endpoint endpoint , final DeploymentUnit unit ) { } private static String getDeploymentSecurityDomainName ( final Endpoint ep ) { } private static ServiceName getEJBViewMethodSecurityAttributesServiceName ( final DeploymentUnit unit , final Endpoint endpoint ) { } }

Fix:
builder . addDependency ( OPTIONAL , EndpointService . getEJBViewMethodSecurityAttributesServiceName ( unit , endpoint ) , EJBViewMethodSecurityAttributesService . class , service . getEJBMethodSecurityAttributeServiceInjector ( ) ) ;