dear all, i have 2 jboss 4.03Ssp1 be configed as cluster. And one stateless 
session bean with load balance and fail over enable. But it seem to be not 
work. Stateless bean also deployed in 2 server

this is my ejb-jab.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 
2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd";>
<ejb-jar>
    <display-name>ServerBean</display-name>
    <enterprise-beans>
        
            <ejb-name>ejbName</ejb-name>
            com.gcs.rmw.server.ServerHome
            com.gcs.rmw.server.Server
            <local-home>com.gcs.rmw.server.ServerBeanLocalHome</local-home>
            com.gcs.rmw.server.ServerBeanLocal
            <ejb-class>com.gcs.rmw.server.ServerBean</ejb-class>
            <session-type>Stateless</session-type>
            <transaction-type>Bean</transaction-type>
                         True 
                         <cluster-config> 
                                <partition-name>MyPartition</partition-name> 
                                <home-load-balance-policy> 
                                org.jboss.ha.framework.interfaces.FirstAvailable
                                </home-load-balance-policy> 
                                <bean-load-balance-policy> 
                                org.jboss.ha.framework.interfaces.FirstAvailable
                                </bean-load-balance-policy> 
                         </cluster-config> 

        
    </enterprise-beans>
    <ejb-client-jar>ServerClient</ejb-client-jar>
</ejb-jar>

i wrote some code to test this fearture. 

System.out.println("loop ....");
                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", SysUtil.getPartitionName());
        props.setProperty("java.naming.provider.url", 
"localhost:1100,duytest:1100");
        props.setProperty("jnp.discoveryTimeout", "10000");

        InitialContext ctx = new InitialContext(props);
        Object renoteObj = ctx.lookup("ServerBean");
        ServerHome home = (ServerHome)renoteObj; 
        server = home.create();
        
        while(true){
                try{
                        
                        server.userLogin("admin", "admin");
                        System.out.println(renoteObj.toString());
                        System.gc();
                }catch(Exception e){
                        //continue run
                        System.out.println(e.getMessage());
                }
                
        }

when in while loop only  jboss 1 recieve call , and jboss 2 do not recieve 
call. I try again with another load balance policy but nothing change. When i 
turn off jboss 1, i recieve error tell that "Service unavalable"

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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to