5 Replies Latest reply on Jan 10, 2014 9:51 AM by nicolyra

    Cluster fail over : No EJBReceiver available for node

    nicolyra

      Hello all,

       

       

      I try to create cluster with 3 JBoss EAP 6.2 servers and I get an error I don't understand on fail over.

       

       

      Environment description :

       

       

      - Two servers (nodeB and nodeC) started in ha mode on the cluster "otherejb",

      - One server (nodeA) started in ha mode on cluster "ejb", nodeA has an outbound on nodeB and knows the cluster "otherejb" (It can communicate with nodeC too),

      - One Java client class which can communicate only with nodeA server.

       

       

      The java client call one SLSB on nodeA server. This SLSB injects, in remote, another SLSB from "otherejb" cluster and calls two function from this SLSB.

      If the first remote call from nodeA goes to nodeB server and if nodeB shutdowns immediately , nodeA makes the second call on nodeC server but it generates an exception and sends it to the Java Client.

       

       

      Is thre problem with my cache management? I don't really know what I have to analyse.

      Any Idea?

       

       

      Java Client code :

       

      public class RemoteStatelessEJBClient {

        public static void main(String[] args) throws Exception {

          testRemoteEJB();

        }

        private static void testRemoteEJB() throws NamingException {

          final SampleBeanStatelessRemote ejb = lookupRemoteEJB();

          int s = ejb.sum();

          System.out.println("Value of stateless Counter " + s);

        }

        private static SampleBeanStatelessRemote lookupRemoteEJB() throws NamingException {

          final Properties jndiProperties = new Properties();

          jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

          final Context context = new InitialContext(jndiProperties);

          EJBClientContext.getCurrent().registerInterceptor(0, new RemoteIdClientInterceptor());

          final String appName = "ClusteredEJB-ear";

          final String moduleName = "ClusteredEJB-1.0-SNAPSHOT";

          final String beanName = "SampleBeanStatelessRemoteImpl";

          final String viewClassName = SampleBeanStatelessRemote.class.getName();

          return (SampleBeanStatelessRemote) context.lookup("ejb:" + appName + "/" + moduleName + "/" + beanName + "!" + viewClassName);

        }

      }

       

      SLSB on NodeA code :

       

      @Stateless

      @Clustered

      @Remote(SampleBeanStatelessRemote.class)

      public class SampleBeanStatelessRemoteImpl implements SecondSampleBeanStatelessRemote {

        int counter = 0;

        @EJB(lookup = "ejb:ClusteredEJB-ear/SecondClusteredEJB-1.0-SNAPSHOT/SecondSampleBeanStatelessRemoteImpl!com.lyra.vads.SecondSampleBeanStatelessRemote")

        private SecondSampleBeanStatelessRemote second;

        @Override

        public int sum() {

          second.sum();

          second.sum();

          System.out.println("Value of the 1rst stateless counter:" + counter);

          return counter;

        }

      }

       

      SLSB on NodeB & Node C code :

       

      @Stateless

      @Clustered

      @Remote(SecondSampleBeanStatelessRemote.class)

      @Interceptors({ RemoteIdInterceptor.class })

      public class SecondSampleBeanStatelessRemoteImpl implements SampleBeanStatelessRemote {

        @Override

        public int sum() {

          int counter = 0;

          counter++;

          System.out.println("Value of the 2nd stateless counter:" + counter);

          return counter;

        }

      }

       

      Exception on NodeA server :

       

      09:47:56,692 WARN  [com.arjuna.ats.jta] (EJB default - 4) ARJUNA016041: prepare on < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a8d82e:1c

      6d2a6:52b158b5:5e, node_name=1, branch_uid=0:ffffc0a8d82e:1c6d2a6:52b158b5:5f, subordinatenodename=null, eis_name=unknown eis name > (ResourceImpl{transactionKe

      y=0:ffffc0a8d82e:1c6d2a6:52b158b5:5e, ejbClientContext=org.jboss.ejb.client.EJBClientContext@7730702e, nodeName='nodeB', state=null}) failed with exception -: j

      ava.lang.IllegalStateException: EJBCLIENT000027: No EJBReceiver available for node name nodeB

        at org.jboss.ejb.client.EJBClientContext.requireNodeEJBReceiver(EJBClientContext.java:830) [jboss-ejb-client-1.0.24.Final-redhat-1.jar:1.0.24.Final-redhat-1]

        at org.jboss.ejb.client.EJBClientContext.requireNodeEJBReceiverContext(EJBClientContext.java:871) [jboss-ejb-client-1.0.24.Final-redhat-1.jar:1.0.24.Final-redh

      at-1]

        at org.jboss.ejb.client.EJBClientManagedTransactionContext$ResourceImpl.prepare(EJBClientManagedTransactionContext.java:230) [jboss-ejb-client-1.0.24.Final-red

      hat-1.jar:1.0.24.Final-redhat-1]

        at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelPrepare(XAResourceRecord.java:213)

        at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2522)

        at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2489)

        at com.arjuna.ats.arjuna.coordinator.BasicAction.prepare(BasicAction.java:2066)

        at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1481)

        at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:98)

        at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)

        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)

        at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)

        at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:92) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:276) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:339) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:238) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHO

      T]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79) [jboss-as-ejb3-7.3

      .0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7

      .3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.3.0.Final-redha

      t-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3

      .0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.3.0.Final-redhat-SNAPSHOT.jar:7.

      3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [jboss-as-ejb3-7.3.0.Final-redhat-

      SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHO

      T]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:329) [jboss-as-ejb3-7.3.0.Final

      -redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$100(MethodInvocationMessageHandler.java:70) [jboss-as-ejb3-7.3.0.Final-re

      dhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:203) [jboss-as-ejb3-7.3.0.Final-redhat

      -SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_04]

        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_04]

        at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_04]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_04]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_04]

        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]

        at org.jboss.threads.JBossThread.run(JBossThread.java:122)

       

       

      09:47:56,703 WARN  [com.arjuna.ats.arjuna] (EJB default - 4) ARJUNA012073: BasicAction.End() - prepare phase of action-id 0:ffffc0a8d82e:1c6d2a6:52b158b5:5e fai

      led.

      09:47:56,704 WARN  [com.arjuna.ats.arjuna] (EJB default - 4) ARJUNA012075: Action Aborting

      09:47:57,707 WARN  [com.arjuna.ats.jta] (EJB default - 4) ARJUNA016045: attempted rollback of < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff

      c0a8d82e:1c6d2a6:52b158b5:5e, node_name=1, branch_uid=0:ffffc0a8d82e:1c6d2a6:52b158b5:5f, subordinatenodename=null, eis_name=unknown eis name > (ResourceImpl{tr

      ansactionKey=0:ffffc0a8d82e:1c6d2a6:52b158b5:5e, ejbClientContext=org.jboss.ejb.client.EJBClientContext@7730702e, nodeName='nodeB', state=null}) failed with exc

      eption code -: java.lang.IllegalStateException: EJBCLIENT000027: No EJBReceiver available for node name nodeB

        at org.jboss.ejb.client.EJBClientContext.requireNodeEJBReceiver(EJBClientContext.java:830) [jboss-ejb-client-1.0.24.Final-redhat-1.jar:1.0.24.Final-redhat-1]

        at org.jboss.ejb.client.EJBClientContext.requireNodeEJBReceiverContext(EJBClientContext.java:871) [jboss-ejb-client-1.0.24.Final-redhat-1.jar:1.0.24.Final-redh

      at-1]

        at org.jboss.ejb.client.EJBClientManagedTransactionContext$ResourceImpl.rollback(EJBClientManagedTransactionContext.java:251) [jboss-ejb-client-1.0.24.Final-re

      dhat-1.jar:1.0.24.Final-redhat-1]

        at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelAbort(XAResourceRecord.java:358)

        at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2875)

        at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2854)

        at com.arjuna.ats.arjuna.coordinator.BasicAction.phase2Abort(BasicAction.java:1924)

        at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1494)

        at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:98)

        at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)

        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)

        at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)

        at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:92) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:276) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:339) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:238) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHO

      T]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79) [jboss-as-ejb3-7.3

      .0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7

      .3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.3.0.Final-redha

      t-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3

      .0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.3.0.Final-redhat-SNAPSHOT.jar:7.

      3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [jboss-as-ejb3-7.3.0.Final-redhat-

      SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHO

      T]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:329) [jboss-as-ejb3-7.3.0.Final

      -redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$100(MethodInvocationMessageHandler.java:70) [jboss-as-ejb3-7.3.0.Final-re

      dhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:203) [jboss-as-ejb3-7.3.0.Final-redhat

      -SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_04]

        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_04]

        at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_04]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_04]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_04]

        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]

        at org.jboss.threads.JBossThread.run(JBossThread.java:122)

       

       

      09:47:57,717 WARN  [com.arjuna.ats.arjuna] (EJB default - 4) ARJUNA012091: Top-level abort of action 0:ffffc0a8d82e:1c6d2a6:52b158b5:5e received TwoPhaseOutcome

      .FINISH_ERROR from com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord

      09:47:57,729 ERROR [org.jboss.as.ejb3.invocation] (EJB default - 4) JBAS014134: L'invocation EJB a échoué sur le composant SampleBeanStatelessRemoteImpl pour la

      méthode public abstract int com.lyra.vads.SampleBeanStatelessRemote.sum(): javax.ejb.EJBTransactionRolledbackException: Transaction rolled back

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleEndTransactionException(CMTTxInterceptor.java:138) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-re

      dhat-SNAPSHOT]

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:118) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:276) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:339) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:238) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHO

      T]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79) [jboss-as-ejb3-7.3

      .0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7

      .3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.3.0.Final-redha

      t-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3

      .0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.3.0.Final-redhat-SNAPSHOT.jar:7.

      3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [jboss-as-ejb3-7.3.0.Final-redhat-

      SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHO

      T]

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

        at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:329) [jboss-as-ejb3-7.3.0.Final

      -redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$100(MethodInvocationMessageHandler.java:70) [jboss-as-ejb3-7.3.0.Final-re

      dhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:203) [jboss-as-ejb3-7.3.0.Final-redhat

      -SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_04]

        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_04]

        at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_04]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_04]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_04]

        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]

        at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      Caused by: javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.

        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1177)

        at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)

        at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:92) [jboss-as-ejb3-7.3.0.Final-redhat-SNAPSHOT.jar:7.3.0.Final-redhat-SNAPSHOT]

        ... 30 more

       

      Exception on Java Client :

       

      Exception in thread "main" javax.ejb.EJBTransactionRolledbackException: Transaction rolled back

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleEndTransactionException(CMTTxInterceptor.java:138)

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:118)

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:276)

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:339)

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:238)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

        at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:329)

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$100(MethodInvocationMessageHandler.java:70)

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:203)

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

        at java.util.concurrent.FutureTask.run(FutureTask.java:166)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

        at java.lang.Thread.run(Thread.java:722)

        at org.jboss.threads.JBossThread.run(JBossThread.java:122)

        at ...asynchronous invocation...(Unknown Source)

        at org.jboss.ejb.client.remoting.InvocationExceptionResponseHandler$MethodInvocationExceptionResultProducer.getResult(InvocationExceptionResponseHandler.java:9

      9)

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:272)

        at org.jboss.ejb.client.EJBHomeCreateInterceptor.handleInvocationResult(EJBHomeCreateInterceptor.java:84)

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:274)

        at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:46)

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:274)

        at org.jboss.ejb.client.ReceiverInterceptor.handleInvocationResult(ReceiverInterceptor.java:129)

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:274)

        at com.lyra.vads.interceptor.RemoteIdClientInterceptor.handleInvocationResult(RemoteIdClientInterceptor.java:25)

        at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:262)

        at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:437)

        at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:182)

        at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:161)

        at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:124)

        at $Proxy0.sum(Unknown Source)

        at com.lyra.vads.RemoteStatelessEJBClient.testRemoteEJB(RemoteStatelessEJBClient.java:23)

        at com.lyra.vads.RemoteStatelessEJBClient.main(RemoteStatelessEJBClient.java:18)

      Caused by: javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.

        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1177)

        at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)

        at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:92)

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:276)

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:339)

        at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:238)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

        at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:329)

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$100(MethodInvocationMessageHandler.java:70)

        at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:203)

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

        at java.util.concurrent.FutureTask.run(FutureTask.java:166)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

        at java.lang.Thread.run(Thread.java:722)

        at org.jboss.threads.JBossThread.run(JBossThread.java:122)

        • 1. Re: Cluster fail over : No EJBReceiver available for node
          wdfink

          From what I understand the nodeB goes away until the current EJB invocation at nodeA is still in progress, right.

           

          In that case the transaction can not commit as one of the resources (nodeB) is not available during commit. It is not possible to know exact what the invocation at nodeB has changed and whether it is possible to commit the transaction.

           

          The failover only works if a new invocation starts, then other cluster members will be used.

          • 2. Re: Cluster fail over : No EJBReceiver available for node
            nicolyra

            Thank you for your explaination. Of course it's normal.

             

            In my case, I have no SQL transaction to manage and I just added the annotation @TransactionManagement(TransactionManagementType.BEAN) to the nodeA SLSB to manage my use case correctly.

             

            Thanks for the rapidity of you answer.

            • 3. Re: Cluster fail over : No EJBReceiver available for node
              nicolyra

              By analyzing more the problem and the answer, I don't understand why I share the transaction between the servers.

               

              Indeed, the SLSB on nodeB can commit its transaction before to be shutdown and I don't understand why nodeA has to commit it too.

              I can have too DataBases, one for nodeA and another for nodeB and nodeC and, in this case I'll prefer to avoir nodeA to chare its transactions with the others servers.

               

              I tried to add the annotation @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) on SLSB on nodeB and nodeC but that changes nothing.

               

              Is it possible to manage CMT transaction on nodeA in the way to avoid the transaction sharing and force nodeA to not commit transactions on nodeB and nodeC servers after a remote call?

              • 4. Re: Cluster fail over : No EJBReceiver available for node
                wdfink

                Not sure whether this works. I need to check it as with EAP6 the behaviour changed and the Tx is propagated by default.

                Maybe this will end in a Feature request

                • 5. Re: Cluster fail over : No EJBReceiver available for node
                  nicolyra

                  I would like to know if it's possible to configure JBoss (in the standalone.xml for example) to force EJBClientTransactionContext.getCurrent() to be null during EJB remote call.

                   

                  For the moment, I changed all my EJBs (SLSB) which call others EJBs( SLSB) in remote:

                  - I added the annotation @TransactionManagement(TransactionManagementType.BEAN),

                  - We created apt project which check if a SLSB has the @TransactionManagement when a remote call is done,

                  - Then I created a new EJBClientInterceptor which throws an exception if it detects than the context.getAttachment(AttachmentKeys.TRANSACTION_ID_KEY) is not null. This Interceptor is added just after the TransacationInterceptor (id 131073).

                   

                  Therefore, it's impossible to propagate transactions and fail over mechanism is as I need.

                  But if there is (or there will be) another solution, it's better...