1 7 8 package org.jboss.ejb3.test.clusteredsession; 9 10 import org.jboss.annotation.ejb.Clustered; 11 import org.jboss.ha.framework.interfaces.RoundRobin; 12 13 import javax.ejb.Stateless ; 14 import javax.ejb.Remote ; 15 import java.rmi.dgc.VMID ; 16 17 22 @Stateless (name="clusteredStateless") 23 @Clustered(loadBalancePolicy = RoundRobin.class) 24 @Remote (ClusteredStatelessRemote.class) 25 public class ClusteredStatelessSessionBean implements ClusteredStatelessRemote 26 { 27 public transient VMID myId = null; 28 public NodeAnswer getNodeState() { 29 if(myId == null) 30 { 31 myId = new VMID (); 32 } 33 return new NodeAnswer(this.myId, "test"); 34 } 35 } 36 | Popular Tags |