1 Reply Latest reply on Oct 17, 2005 4:19 PM by Viswa Vutharkar

    Clustered JBoss instances with non-clustered CMP entity bean

    Viswa Vutharkar Newbie

      I have two JBoss nodes clustered together. Both the JBoss instances point to the same datasource (a DB2 database). I have a CMP entity bean deployed on both the nodes. They both will be reading/writing data into the same datasource/table, since the same datasource is used.

      The CMP bean is always accessed via a clustered SLSB (residing within the same JBoss instance). MyCMP beans are never accessed DIRECTLY from a remote client outside of the JBOSS instances. They are always accessed via the clustered SLSB. So I already get loadbalancing , failover and replication because of this design.

      My question is how to achieve data integrity/synchronization in this scenario ? Will it be sufficient if I specify <row-locking> for my CMP beans so that the read/writes are synchronized at the database level ?

      Or do I need to cluster my CMP entity beans as well?

        • 1. Re: Clustered JBoss instances with non-clustered CMP entity
          Viswa Vutharkar Newbie

          Wanted to add that, the 4.0.3 admin guide seems to discourage the clustering of EJB 2.x entity bean.

          And the entity bean clustering service in EJB 3.0 primarily deals with distributed caching and replication, instead
          of load balancing.


          Hence the question arised, whether its a good idea to cluster my CMP (2.x) entity beans, when both the clustered nodes will be reading and writing data possibly simultaneously.

          Also will there be any disadvantages of using row-level locking ? Is it more prone to deadlocking issues?