How to use "corbaloc" to lookup cluster server and failover in EAP 7

Version 1

    Hi,

     

    I can use EAP 7 and lookup by "corbaloc" with cluster URL to get EJB bean, however, it always lookup first server.  Also, if I shutdown first server, client cannot lookup second one and throw connection exception as first server failure.  Please help how?

     

    props.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
    props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
    props.put(Context.PROVIDER_URL, "corbaloc::POC1:9610,:POC2:9610");