Buggy code:
public final class RemotingConnectionEJBReceiver extends EJBReceiver < RemotingAttachments > { private static final Logger logger = Logger . getLogger ( RemotingConnectionEJBReceiver . class ) ; private static final String EJB_CHANNEL_NAME = "jboss.ejb" ; private static final RemotingEJBClientInterceptor [ ] REMOTING_EJB_INTERCEPTORS ; private final Connection connection ; private final Map < EJBReceiverContext , ChannelAssociation > channelAssociations = new IdentityHashMap < EJBReceiverContext , ChannelAssociation > ( ) ; private final byte clientProtocolVersion = 1 ; private final String clientMarshallingStrategy = "river" ; private final Map < EJBReceiverContext , CountDownLatch > moduleAvailabilityReportLatches = new IdentityHashMap < EJBReceiverContext , CountDownLatch > ( ) ; private final String cachedToString ; public RemotingConnectionEJBReceiver ( final Connection connection ) { } @ Override protected EJBClientInterceptor < RemotingAttachments > [ ] getClientInterceptors ( ) { } @ Override public void associate ( final EJBReceiverContext context ) { } @ Override public void processInvocation ( final EJBClientInvocationContext < RemotingAttachments > clientInvocationContext , final EJBReceiverInvocationContext ejbReceiverInvocationContext ) throws Exception { } @ Override public SessionID openSession ( final EJBReceiverContext receiverContext , final String appName , final String moduleName , final String distinctName , final String beanName ) throws Exception { } @ Override public void verify ( final String appName , final String moduleName , final String distinctName , final String beanName ) throws Exception { } @ Override public RemotingAttachments createReceiverSpecific ( ) { } @ Override protected void sendCommit ( final EJBReceiverContext receiverContext , final TransactionID transactionID , final boolean onePhase ) throws XAException { } @ Override protected void sendRollback ( EJBReceiverContext receiverContext , TransactionID transactionID ) throws XAException { } @ Override protected int sendPrepare ( final EJBReceiverContext receiverContext , final TransactionID transactionID ) throws XAException { } @ Override protected void sendForget ( final EJBReceiverContext receiverContext , final TransactionID transactionID ) throws XAException { } @ Override protected void beforeCompletion ( final EJBReceiverContext receiverContext , final TransactionID transactionID ) { } void moduleAvailable ( final EJBReceiverContext receiverContext , final String appName , final String moduleName , final String distinctName ) { } void moduleUnavailable ( final EJBReceiverContext receiverContext , final String appName , final String moduleName , final String distinctName ) { RemotingConnectionEJBReceiver . logger . debug ( ( ( ( ( ( ( ( "Received<seq2seq4repair_space>module<seq2seq4repair_space>un-availability<seq2seq4repair_space>message<seq2seq4repair_space>for<seq2seq4repair_space>appName:<seq2seq4repair_space>" + appName ) + "<seq2seq4repair_space>moduleName:<seq2seq4repair_space>" ) + moduleName ) + "<seq2seq4repair_space>distinctName:<seq2seq4repair_space>" ) + distinctName ) + "<seq2seq4repair_space>for<seq2seq4repair_space>receiver<seq2seq4repair_space>context<seq2seq4repair_space>" ) + receiverContext ) ) ; <START_BUG> this . deRegisterModule ( appName , moduleName , distinctName ) ; <END_BUG> } private ChannelAssociation requireChannelAssociation ( final EJBReceiverContext ejbReceiverContext ) { } @ Override public String toString ( ) { } }

Fix:
this . deregisterModule ( appName , moduleName , distinctName ) ;