Buggy code:
public class EJBClientDescriptorMetaDataProcessor implements DeploymentUnitProcessor { private static final Logger logger = Logger . getLogger ( EJBClientDescriptorMetaDataProcessor . class ) ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( ( deploymentUnit . getParent ( ) ) != null ) { return ; } final EJBClientDescriptorMetaData ejbClientDescriptorMetaData = deploymentUnit . getAttachment ( EJB_CLIENT_METADATA ) ; if ( ejbClientDescriptorMetaData == null ) { return ; } final Module module = deploymentUnit . getAttachment ( MODULE ) ; if ( module == null ) { return ; } final ServiceName ejbClientContextServiceName = BASE_SERVICE_NAME . append ( deploymentUnit . getName ( ) ) ; final ServiceTarget serviceTarget = phaseContext . getServiceTarget ( ) ; final EJBClientConfiguration ejbClientConfiguration = this . createClientConfiguration ( phaseContext . getServiceRegistry ( ) , module . getClassLoader ( ) , ejbClientDescriptorMetaData ) ; <START_BUG> final DescriptorBasedEJBClientContextService service = new DescriptorBasedEJBClientContextService ( ejbClientConfiguration ) ; <END_BUG> final ServiceBuilder serviceBuilder = serviceTarget . addService ( ejbClientContextServiceName , service ) ; for ( final EJBClientDescriptorMetaData . RemotingReceiverConfiguration remotingReceiverConfiguration : ejbClientDescriptorMetaData . getRemotingReceiverConfigurations ( ) ) { final String connectionRef = remotingReceiverConfiguration . getOutboundConnectionRef ( ) ; final ServiceName connectionDependencyService = OUTBOUND_CONNECTION_BASE_SERVICE_NAME . append ( connectionRef ) ; service . addRemotingConnectionDependency ( serviceBuilder , connectionDependencyService ) ; final Properties channelCreationProps = remotingReceiverConfiguration . getChannelCreationOptions ( ) ; final OptionMap channelCreationOpts ; if ( channelCreationProps == null ) { channelCreationOpts = OptionMap . EMPTY ; } else { channelCreationOpts = this . getOptionMapFromProperties ( channelCreationProps , this . getClass ( ) . getClassLoader ( ) ) ; } EJBClientDescriptorMetaDataProcessor . logger . debug ( ( ( ( "Channel<seq2seq4repair_space>creation<seq2seq4repair_space>options<seq2seq4repair_space>for<seq2seq4repair_space>connection<seq2seq4repair_space>" + connectionRef ) + "<seq2seq4repair_space>are<seq2seq4repair_space>" ) + channelCreationOpts ) ) ; service . setChannelCreationOptions ( connectionRef , channelCreationOpts ) ; service . setConnectionCreationTimeout ( connectionRef , remotingReceiverConfiguration . getConnectionTimeout ( ) ) ; } if ( ! ( ejbClientDescriptorMetaData . isLocalReceiverExcluded ( ) ) ) { final Boolean passByValue = ejbClientDescriptorMetaData . isLocalReceiverPassByValue ( ) ; if ( passByValue != null ) { final ServiceName localEjbReceiverServiceName = ( passByValue == true ) ? LocalEjbReceiver . BY_VALUE_SERVICE_NAME : LocalEjbReceiver . BY_REFERENCE_SERVICE_NAME ; serviceBuilder . addDependency ( localEjbReceiverServiceName , LocalEjbReceiver . class , service . getLocalEjbReceiverInjector ( ) ) ; } else { serviceBuilder . addDependency ( DEFAULT_LOCAL_EJB_RECEIVER_SERVICE_NAME , LocalEjbReceiver . class , service . getLocalEjbReceiverInjector ( ) ) ; } } serviceBuilder . addDependency ( TCCL_BASED_EJB_CLIENT_CONTEXT_SELECTOR_SERVICE_NAME ) ; serviceBuilder . install ( ) ; EJBClientDescriptorMetaDataProcessor . logger . debug ( ( ( ( ( "Deployment<seq2seq4repair_space>unit<seq2seq4repair_space>" + deploymentUnit ) + "<seq2seq4repair_space>will<seq2seq4repair_space>use<seq2seq4repair_space>" ) + ejbClientContextServiceName ) + "<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>EJB<seq2seq4repair_space>client<seq2seq4repair_space>context<seq2seq4repair_space>service" ) ) ; phaseContext . addDeploymentDependency ( ejbClientContextServiceName , EJB_CLIENT_CONTEXT ) ; } @ Override public void undeploy ( DeploymentUnit context ) { } private EJBClientConfiguration createClientConfiguration ( final ServiceRegistry serviceRegistry , final ClassLoader classLoader , final EJBClientDescriptorMetaData ejbClientDescriptorMetaData ) throws DeploymentUnitProcessingException { } private static OptionMap getOptionMapFromProperties ( final Properties properties , final ClassLoader classLoader ) { } }

Fix:
final DescriptorBasedEJBClientContextService service = new DescriptorBasedEJBClientContextService ( ejbClientConfiguration , module . getClassLoader ( ) ) ;