[jboss-user] [Clustering/JBoss] - Re: HA-JNDI server side problem

wecucho do-not-reply at jboss.com
Wed May 21 09:05:03 EDT 2008

Thanks for your reply, i test what you say but that does not work :(, still respond the same node which is running the method, i think are a kind of "affinity" that make the InitialContext to use the local or something.

Im gonna to explain the problem better but i think that its difficult to see yet, i create a simple method to determine which exactly node is the master node of a cluster give a node of it or several nodes using the HA-JNDI port of course (does not mather IF i use Round Robin Balance *), and it works great OUTSIDE the cluster, the method start to lookup and the nodes start to respond in the round robin way, so, in my test enviroment that tooks 2 iteration tops.. for instance, i start looking for the master and..

1.- respond the master: thats it, i have the master at first time
2.- respond the other node: upps i have the MasterNode in false and return, my method is gonna lookup again and for the balance (Round Robin) the master will respond...

As my program is a kind of Queue manager, he needs to dynamically creates and delete queues, so it needs the  "jboss.mq:service=DestinationManager" who lives only in the MASTER node, so i can execute operations like: 
anonymous wrote : 
  | mbsMaster.invoke(destinationManager, "createQueue", new Object[] { name, name }, new String[] {
  | 					String.class.getName(), String.class.getName() });


anonymous wrote : 
  | mbsMaster.invoke(destinationManager, "destroyQueue", new Object[] { name}, new String[] {
  | 					String.class.getName()});

When i try your suggestion this was my result...

anonymous wrote : 
  | 2008-05-21 08:11:10,899 INFO  [STDOUT] trying with
  | 2008-05-21 08:11:10,952 INFO  [STDOUT]  obtained
  | 2008-05-21 08:11:10,953 INFO  [STDOUT] trying with
  | 2008-05-21 08:11:10,955 INFO  [STDOUT]  obtained
  | 2008-05-21 08:11:10,955 INFO  [STDOUT] trying with
  | 2008-05-21 08:11:10,957 INFO  [STDOUT]  obtained
  | 2008-05-21 08:11:10,957 INFO  [STDOUT] trying with
  | 2008-05-21 08:11:10,959 INFO  [STDOUT]  obtained
  | 2008-05-21 08:11:10,959 INFO  [STDOUT] trying with
  | 2008-05-21 08:11:10,961 INFO  [STDOUT]  obtained
  | 2008-05-21 08:11:10,961 INFO  [STDOUT] trying with
  | 2008-05-21 08:11:10,963 INFO  [STDOUT]  obtained
  | 2008-05-21 08:11:10,964 INFO  [STDOUT] trying with
  | 2008-05-21 08:11:10,965 INFO  [STDOUT]  obtained
  | 2008-05-21 08:11:10,966 INFO  [STDOUT] trying with
  | 2008-05-21 08:11:10,968 INFO  [STDOUT]  obtained
  | 2008-05-21 08:11:10,972 INFO  [STDOUT] trying with
  | 2008-05-21 08:11:10,973 INFO  [STDOUT]  obtained
  | 2008-05-21 08:11:10,974 INFO  [STDOUT] trying with
  | 2008-05-21 08:11:10,975 INFO  [STDOUT]  obtained
  | 2008-05-21 08:11:10,976 INFO  [STDOUT] not found

He was trying to look directly in the master node but for some mysterious and divine reason that only god is able to answer that lookup obtain the local Context, if i run the same test in the master node directly i get:

anonymous wrote : 
  | 2008-05-21 08:15:11,499 INFO  [STDOUT] trying with
  | 2008-05-21 08:15:11,552 INFO  [STDOUT]  obtained
  | 2008-05-21 08:15:11,632 INFO  [STDOUT] MASTER found!

There has to be some kind of affinity as i said before that make this happend, and my best guest is that have to be a way to disable this behavior in the jboss, or mabye there have to be a different way to ask for the master..

Thanks for your time :) 

Maybe with this additional info your or anyone can see my problem better.

* If my balance is Round Robin the only thing i have to do is ask for a resource (lookup --> ctx.lookup("jmx/invoker/RMIAdaptor")) and get the MasterNode variable and if TRIES is bigger than the number of the nodes in the cluster ill gonna get the master node in some point.

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

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

More information about the jboss-user mailing list