Well here's the code for the client:

  | public void execute(){
  |             Contador contador = obterContador();
  |             int total = 0;
  |             for(int i=0;i<repeat;i++){
  |                     total = contador.increase();
  |                     System.out.println("O total é:" + total);
  |                     try {
  |                             Thread.sleep(5000);
  |                     } catch (InterruptedException e) {
  |                             e.printStackTrace();
  |                     }
  |             }
  |     }
  |     
  |     public Contador obterContador(){
  |             Contador contador = null;
  |             try {
  |                     Properties p = new Properties();
  |                     p.put(Context.INITIAL_CONTEXT_FACTORY,
  |                           "org.jnp.interfaces.NamingContextFactory");
  |                     p.put(Context.URL_PKG_PREFIXES, 
"jboss.naming:org.jnp.interfaces");
  |                     p.put(Context.PROVIDER_URL, "192.168.0.39:1100"); // 
HA-JNDI port.
  | 
  |                     InitialContext ctx = new InitialContext(p);
  |                     contador = (Contador) ctx.lookup("ContadorBean/remote");
  |             } catch (NamingException e) {
  |                     e.printStackTrace();
  |             }
  |             return contador;
  |     }
  | 
Yeah, pretty much what you've described :

After a few calls and during the sleep of the client, I shutdown the server 
that is responding to the calls. I was hopping that the second node would 
answer the calls. 

PS: I've ran the JGroups tests for receiver and sender, the draw example, and 
both works ok.

Best regards

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

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

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to