[jboss-user] [Clustering/JBoss] - Re: Very strange problem while looking up HAJMS Topic

bstansberry@jboss.com do-not-reply at jboss.com
Tue Jan 27 23:41:10 EST 2009

OK, I see what's going on here. The key difference between your two stack traces is the thread involved. In the NNFE case, it's the JGroups thread that carries messages up from the network. You then use the thread to instantiate an SLSB, which then does an HA-JNDI lookup, which makes a group RPC to the cluster and then blocks waiting for responses.

Problem is the response to that group RPC will not be received because the thread that needs to carry the response up from the network is the same JGroups thread that is blocking waiting for the response! What will happen is the JGroups thread will block 60 secs waiting for a response, never get one, and then return, following which HA-JNDI throws the NNFE.

Bottom line -- don't call back into the cluster from a JGroups thread. Somewhere in here you need pass a task to another thread to let it invoke on the SLSB so the JGroups thread can return.

  | 10:23:13,051 ERROR [STDERR] 	at $Proxy462.startManagers(Unknown Source)
  | 10:23:13,051 ERROR [STDERR] 	at com.navineo.sa.jmx.ha.taches.ComEmbarquesHAS.doDemarrerTacheEgoiste(
  | ComEmbarquesHAS.java:19)
  | 10:23:13,051 ERROR [STDERR] 	at com.navineo.sa.jmx.ha.taches.core.TacheEgoisteHAS.doDemarrer(TacheEg
  | oisteHAS.java:16)
  | 10:23:13,051 ERROR [STDERR] 	at com.navineo.sa.jmx.ha.HAS.demarrer(HAS.java:25)
  | 10:23:13,051 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 10:23:13,051 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
  | .java:39)
  | 10:23:13,051 ERROR [STDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
  | ssorImpl.java:25)
  | 10:23:13,051 ERROR [STDERR] 	at java.lang.reflect.Method.invoke(Method.java:597)
  | 10:23:13,051 ERROR [STDERR] 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatc
  | her.java:155)
  | 10:23:13,051 ERROR [STDERR] 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 10:23:13,051 ERROR [STDERR] 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 10:23:13,051 ERROR [STDERR] 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker
  | .java:264)
  | 10:23:13,051 ERROR [STDERR] 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 10:23:13,051 ERROR [STDERR] 	at com.navineo.sa.jmx.ha.topologychange.taches.cmd.CommandeRepartitionS
  | upport.executerLocalement(CommandeRepartitionSupport.java:54)
  | 10:23:13,052 ERROR [STDERR] 	at com.navineo.sa.jmx.ha.taches.notification.basculement.BasculeTachesE
  | goistesHANB$1.handleNotification(BasculeTachesEgoistesHANB.java:90)
  | 10:23:13,052 ERROR [STDERR] 	at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotifica
  | tion(JBossNotificationBroadcasterSupport.java:127)
  | 10:23:13,052 ERROR [STDERR] 	at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotificati
  | on(JBossNotificationBroadcasterSupport.java:108)
  | 10:23:13,052 ERROR [STDERR] 	at org.jboss.ha.jmx.HAServiceMBeanSupport._receiveRemoteNotification(HA
  | ServiceMBeanSupport.java:476)

The other one works because it's a JBoss Web thread making the call.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205119#4205119

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205119

More information about the jboss-user mailing list