1 Reply Latest reply on Jan 31, 2005 8:15 PM by hariv

    Cluster Problem 2

      Hello,

      I have a major problem/question regarding Clustering in JBoss (v. 3.2.6). There are 2 JBoss servers running in cluster mode. There as Entity Bean called Account. When it's being updated by the client, sometimes the database is not updated nor the other JBoss server (or its cache). Bellow are fragments of the code:

      =====================================
      Jboss.xml

      <jboss>
      ??.
       <enterprise-beans>
       ??
       <entity>
       <resource-ref>
       <res-ref-name>jdbc/MySqlDS</res-ref-name>
       <jndi-name>MySqlDS</jndi-name>
       </resource-ref>
       <ejb-name>AccountBean</ejb-name>
       <jndi-name>account/MySQL</jndi-name>
       <cache-invalidation>true</cache-invalidation>
       <configuration-name>Clustered BMP EntityBean</configuration-name>
       <clustered>True</clustered>
       <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.FirstAvailable
       </bean-load-balance-policy>
       </cluster-config>
       </entity>
       ?..
      </jboss>


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

      ejb-jar.xml
      <ejb-jar>
       ??.
      <entity>
       <resource-ref>
       <description>MySQL</description>
       <res-ref-name>jdbc/MySqlDS</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
       </resource-ref>
       <description>N/A</description>
       <ejb-name>AccountBean</ejb-name>
       <home>AccountHome</home>
       <remote>Account</remote>
       <ejb-class>AccountBean</ejb-class>
       <transaction-type>Container</transaction-type>
       <persistence-type>Bean</persistence-type>
       <prim-key-class>java.lang.Integer</prim-key-class>
       <reentrant>False</reentrant>
       <primkey-field>id</primkey-field>
      </entity>
       ??
      </ejb-jar>



        • 1. Re: Cluster Problem 2
          hariv

          Please check the commit-option you are using. Please check whether you have set the clustered option in jboss.xml for your entity beans to true. If you are using commit-option A , then the container assumes the it has total control over the entity bean(ie. the tables are not updated by other applications,or the same entity bean eunning in another jboss instance)


          Thanks

          Hari