I do all thing as cluster doc said. But SLSB cannot loadbalance. I run 2 Jboss AS instance on my destop, only one Jboss AS reply for my call. If I shutdown that Jboss AS, my client side will get error (-> cannot failover)
this is my config:
- jboss.xml :
<jboss>
.....
<clustered>True</clustered>
<cluster-config>
<partition-name>${jboss.partition.name:DefaultPartition}</partition-name>
<home-load-balance-policy>
org.jboss.ha.framework.interfaces.RoundRobin
</home-load-balance-policy>
<bean-load-balance-policy>
org.jboss.ha.framework.interfaces.RoundRobin
</bean-load-balance-policy>
</cluster-config>
....
</jboss>
Properties props = new Properties();
props.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
props.setProperty("java.naming.factory.url.pkgs", "jboss.naming:org.jnp.interfaces");
props.setProperty("jnp.partitionName", m_PartitionName);
props.setProperty("java.naming.provider.url", m_JNDIServerList);
InitialContext ctx = new InitialContext(props);
Object ejbHome = ctx.lookup("ServerBean");
ServerHome serverHome = (ServerHome) PortableRemoteObject.narrow(ejbHome, ServerHome.class);
Server server = serverHome.create();
while(true){
server.doSomething();
thread.sleep(2000);
}