Hi Nicolas,

Thanks for the steps to test DCC.
I tried the way you explained. But cache is not being cleared in another
instance. It is showing same value as before modifying Party in another
Ofbiz instance. Is there anything else i need to do to fix this behaviour?
I was expecting it to be 0 byte. But it is not changing.

[image: image.png]

Hi Jacques,

I put the log in GenericDelegator::ClearCacheLine methods. When i am
modifying any entity( i tried with Party) in Ofbiz instance 1, then i can
see that log are being written in second Ofbiz instance with custom log
messages that i put.

Does it mean that DCC is working fine? I am not clear though. Because what
Nicolas suggested, according to that cache is not being cleared. But as per
your recommendation, i can see logs. Attaching log snippet too for both
instances.

PS: Ofbiz instance 1: Here i am modifying the Party instance.

HAPPY NEW YEAR 2020 TO ALL :)

BR//
Vipin Nirwal


On Tue, Dec 31, 2019 at 2:32 PM Jacques Le Roux <
[email protected]> wrote:

> Hi Vipin,
>
> Also you can put log statements in methods like
> GenericDelegato::clearCacheLine
>
> HTH
>
> Jacques
>
> Le 31/12/2019 à 09:39, Nicolas Malin a écrit :
> > Hello,
> >
> > Display on your instance first OFBiz instance a party, go to your cache
> > maintenance [1] and check it's loaded with values.
> >
> > On your second instance, edit this party through webtools [2], edit it
> >
> > Now on your first instance [1] your cache are normally clear.
> >
> > Nicolas
> >
> > [1]
> >
> webtools/control/FindUtilCacheElements?UTIL_CACHE_NAME=entitycache.entity.default.Party
> >
> > [2] webtools/control/FindGeneric?entityName=Party
> >
> > On 31/12/2019 07:26, vipin nirwal wrote:
> >> Hi All,
> >>
> >> I have implemented DCC functionality as mentioned on below link.
> >>
> >>
> https://cwiki.apache.org/confluence/display/OFBIZ/Distributed+Entity+Cache+Clear+%28DCC%29+Mechanism#DistributedEntityCacheClear(DCC)Mechanism-DistributedEntityCacheClear(DCC)Mechanism
> >>
> >>
> >> I can see counter increasing for Enqueue and Dequeue messages in
> ActiveMQ
> >> topic. But  how can i test for sure that DCC is working? Is there a
> testing
> >> mechanism for DCC? Please let me know.
> >> Where can i see that cache is being cleared whenever i am updating a
> >> product( product description for example)?
> >>
>


-- 
Thanks & Regards
Vipin Nirwal
First Ofbiz Instance:

2019-12-31 11:14:06,009 |jsse-nio-8443-exec-9 |ServiceDispatcher             
|T| Sync service [partymgr/genericBasePermissionCheck] finished in [2] 
milliseconds
2019-12-31 11:14:06,010 |jsse-nio-8443-exec-9 |ServiceEcaRule                
|I| For Service ECA [partyBasePermissionCheck] on [return] got false for 
condition: [hasPermission][equals][false][true][Boolean]
2019-12-31 11:14:06,010 |jsse-nio-8443-exec-9 |ServiceDispatcher             
|T| Sync service [partymgr/partyBasePermissionCheck] finished in [6] 
milliseconds
2019-12-31 11:14:06,013 |jsse-nio-8443-exec-9 |Log                           
|W| [CommonPermissionServices.xml#genericBasePermissionCheck line 59] This 
simple-method-call is deprecated! Please use a service-call of 
genericBasePermissionCheck instead.
2019-12-31 11:14:06,015 |jsse-nio-8443-exec-9 |ServiceDispatcher             
|T| Sync service [partymgr/genericBasePermissionCheck] finished in [2] 
milliseconds
2019-12-31 11:14:06,017 |jsse-nio-8443-exec-9 |ServiceDispatcher             
|T| Sync service [partymgr/acctgBasePermissionCheck] finished in [6] 
milliseconds
2019-12-31 11:14:06,021 |jsse-nio-8443-exec-9 |Log                           
|W| [CommonPermissionServices.xml#genericBasePermissionCheck line 59] This 
simple-method-call is deprecated! Please use a service-call of 
genericBasePermissionCheck instead.
2019-12-31 11:14:06,023 |jsse-nio-8443-exec-9 |ServiceDispatcher             
|T| Sync service [partymgr/genericBasePermissionCheck] finished in [1] 
milliseconds
2019-12-31 11:14:06,025 |jsse-nio-8443-exec-9 |ServiceDispatcher             
|T| Sync service [partymgr/acctgBasePermissionCheck] finished in [5] 
milliseconds
2019-12-31 11:14:06,316 |jsse-nio-8443-exec-9 |ServiceDispatcher             
|T| Sync service [partymgr/getOrderedSummaryInformation] finished in [5] 
milliseconds
2019-12-31 11:14:06,498 |jsse-nio-8443-exec-9 |ServerHitBin                  
|I| Visit delegatorName=default, ServerHitBin delegatorName=default
2019-12-31 11:14:06,501 |jsse-nio-8443-exec-9 |GenericDelegator              
|I| $$$$$ IN CLEAR CACHE LINE METHOD $$$$$
2019-12-31 11:14:06,502 |jsse-nio-8443-exec-9 |GenericDelegator              
|I| $$$$$ IN CLEAR CACHE LINE METHOD $$$$$
2019-12-31 11:14:06,512 |jsse-nio-8443-exec-9 |ControlServlet                
|T| [[[updatePerson(Domain:https://localhost)] Request Done- total:1.09,since 
last([updatePerson(Dom...):1.09]]
2019-12-31 11:14:07,100 |jsse-nio-8443-exec-5 |ControlServlet                
|T| [[[getJSONuiLabelArray(Domain:https://localhost)] Request Begun, 
encoding=[UTF-8]- total:0.0,since last(Begin):0.0]]
2019-12-31 11:14:07,102 |jsse-nio-8443-exec-5 |JWTManager                    
|I| Internal single sign on is disabled.
2019-12-31 11:14:07,109 |jsse-nio-8443-exec-5 |RequestHandler                
|I| Ran Event [java:org.apache.ofbiz.common.CommonEvents#getJSONuiLabelArray] 
from [request], result is [success]
2019-12-31 11:14:07,113 |jsse-nio-8443-exec-5 |ServerHitBin                  
|I| Visit delegatorName=default, ServerHitBin delegatorName=default
2019-12-31 11:14:07,119 |jsse-nio-8443-exec-5 |GenericDelegator              
|I| $$$$$ IN CLEAR CACHE LINE METHOD $$$$$
2019-12-31 11:14:07,119 |jsse-nio-8443-exec-5 |GenericDelegator              
|I| $$$$$ IN CLEAR CACHE LINE METHOD $$$$$
2019-12-31 11:14:07,134 |jsse-nio-8443-exec-5 |ControlServlet                
|T| [[[getJSONuiLabelArray(Domain:https://localhost)] Request Done- 
total:0.034,since last([getJSONuiLabelAr...):0.034]]


Second Ofbiz Instance:

2019-12-31 11:14:05,572 |iveMQ Session Task-4 |EntityCacheServices           
|I| Got a clear cache line by value service call; entityName: PartyNameHistory
2019-12-31 11:14:05,572 |iveMQ Session Task-4 |GenericDelegator              
|I| $$$$$ IN CLEAR CACHE LINE METHOD $$$$$
2019-12-31 11:14:05,574 |iveMQ Session Task-4 |ServiceDispatcher             
|T| Sync service [JMSDispatcher/clearCacheLineByValue] finished in [2] 
milliseconds
2019-12-31 11:14:05,718 |iveMQ Session Task-4 |EntityCacheServices           
|I| Got a clear cache line by value service call; entityName: Person
2019-12-31 11:14:05,718 |iveMQ Session Task-4 |GenericDelegator              
|I| $$$$$ IN CLEAR CACHE LINE METHOD $$$$$
2019-12-31 11:14:05,719 |iveMQ Session Task-4 |ServiceDispatcher             
|T| Sync service [JMSDispatcher/clearCacheLineByValue] finished in [1] 
milliseconds
2019-12-31 11:14:05,808 |iveMQ Session Task-4 |EntityCacheServices           
|I| Got a clear cache line by value service call; entityName: Party
2019-12-31 11:14:05,808 |iveMQ Session Task-4 |GenericDelegator              
|I| $$$$$ IN CLEAR CACHE LINE METHOD $$$$$
2019-12-31 11:14:05,809 |iveMQ Session Task-4 |ServiceDispatcher             
|T| Sync service [JMSDispatcher/clearCacheLineByValue] finished in [2] 
milliseconds


Reply via email to