I have the following problems when trying to set a JBoss cluster:

It's an online financial trading application. The first problem is with the 
Session Bean which methods are called by the Data Feed to update the quotes. 
There are 2 JBoss servers running in cluster mode but when the Data Feed calls 
method of Session Bean on one of the servers, the new quotes are not propagated 
to the other one. 

Here's the code of the Data Feed which invokes the Session Bean:

==============================
Data Feed

????..
Properties props = new 
Properties();props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
props.put(Context.URL_PKG_PREFIXES,"jboss.naming:org.jnp.interfaces");
props.put(Context.PROVIDER_URL,"server1:1100,server2:1100");
InitialContext jndiContext = new InitialContext(props);
Object ref  = jndiContext.lookup(obj_ref);
inssh = (InstrumentSessionHome) PortableRemoteObject.narrow(ref, 
InstrumentSessionHome.class);
inss = inssh.create();
?????..
inss. changeQuotes (bq, sq);
?????
==============================

This is fragment of the code of the Session Bean:

public class InstrumentSessionBean implements SessionBean {

        public static Hashtable buyQuotes = new Hashtable();
        public static Hashtable sellQuotes = new Hashtable();
???..

public void changeQuotes(Hashtable bq, Hashtable sq) throws Exception{
    buyQuotes=bq;
    sellQuotes=sq;
}
???.

=============================

Here are the settings for the deployment of the Session Bean:

Jboss.xml



??.
        <enterprise-beans>
        ??
                
                        <ejb-name>InstrumentSessionBean</ejb-name>
                        <jndi-name>ejb/InstrumentSession</jndi-name>
                        True
                        <cluster-config>
                                
<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>
                
        ?..

==============================

ejb-jar.xml

<ejb-jar>
        ??.

        N/A
        <ejb-name>InstrumentSessionBean</ejb-name>
        InstrumentSessionHome
        InstrumentSession
        <ejb-class>InstrumentSessionBean</ejb-class>
        <session-type>Stateless</session-type>
        <transaction-type>Container</transaction-type>

        ??
</ejb-jar>

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

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


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to