Could you please verify below steps on how this will be working -

Region X - needs to be replicated
Region Y - doesn't need to be replicated

Thread # 1 - Writes/puts into Region X in below steps

   a. Writes/puts into Region X

Thread # 2 - Writes into Region Y at exact same time as Thread # 1 in below 
steps

   a. Before writing/putting into the cache, call setCacheModeLocal(true)
   b. Writes/puts into Region Y

Thread # 3 - Writes into Region X at exact same time as Thread # 1 in below 
steps

   a. Writes/puts into Region X

As per your comments Thread # 2 step a) setCacheModeLocal variable is stored 
locally to it's own thread.

Let's go step by step - 

1. Thread # 1 step a) is about to write into the region X & before it completes 
it's writing/putting step....

2. Thread # 2 step a) sets it to local cache mode.

3. Thread # 1 step a) is now actually writing into the cache - assuming default 
value of local cache mode variable is false this will be replicated - right?

4. Thread # 2 step b) writes into region Y - it stores locally.

5. Thread # 3 step a) - same as Thread # 1 - correct?

So I just need to call setCacheModeLocal(true) only before writing/putting into 
Region Y. Default value of this variable in local threads is false - right?



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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225587
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to