Package org.jboss.demo.cluster.slsb

Examples of org.jboss.demo.cluster.slsb.StatefulSession


 
  private void execute() throws Exception {
    Hashtable<String, String> jndiProps = new Hashtable<String, String>();
    jndiProps.put( Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming" );
    Context context = new InitialContext( jndiProps );
    StatefulSession sfsb = (StatefulSession)context.lookup(SFSB_JNDI);
   
    System.out.println("Sticky routes Test");
    for(int i = 0 ; i < 10 ; i ++){
      System.out.println(sfsb.getServer());
    }
   
    System.out.println("\nFail Over Test");
    for(int i = 0 ; i < 10 ; i ++) {
      System.out.println(sfsb.getName());
      sfsb.setName("sfsb-test-" + i);
      Thread.currentThread().sleep(1000 * 5);
    }
  }
 
View Full Code Here

TOP

Related Classes of org.jboss.demo.cluster.slsb.StatefulSession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.