[OFBiz] Dev - Safe to use cache on views?
Al Byers
byersa at automationgroups.com
Fri Sep 10 00:03:31 EDT 2004
Ok, here is what I have learned. The reason my entity cache list was not
keeping entities in the cache seems to be that I was not starting OFBiz
with enough heap memory set. The arguments that I am using now are:
VMARGS=" - Xms192M -Xmx192 -Dofbiz.admin.port=$ADMIN_PORT
-Dofbiz.admin.key=$ADMIN_KEY"
(for starting in the debug, it looks like this:
VMARGS=" -Xms192M -Xmx256M -Dofbiz.admin.port=$ADMIN_PORT
-Dofbiz.admin.key=$ADMIN_KEY -Xrs -Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8999 "
)
Before I was not setting the -Xms arg at all and David said that what
was happening was that when the heap needed to expand it would first
cannibalize the caches first. So the above line in startofbiz.sh seems
to have fixed that.
Now when I update an entity that is contained in the
ContentAssocDataResourceViewFrom view, it clears the "entity-list"
cache, but not the "entity" cache of the same name.
-Al
David E. Jones wrote:
>
> Well, that's not good. Maybe they aren't safe to use for
> view-entities, or certain types of view-entities, yet.
>
> Any thoughts Adam?
>
> -David
>
>
> On Sep 9, 2004, at 11:58 AM, Al Byers wrote:
>
>> Actually, it does not seem to be working for me, but maybe I am not
>> using it correctly. Is there something special that I need to do?
>>
>> I am using a three entity view, ContentAssocDataResourceViewFrom,
>> (and one of the entities, ContentAssoc, has a multi-field primary
>> key). When I make an update to one of the entities of the view, a
>> PrimaryKeyFinder query with "use-cache" set to true does not return
>> a current entity - should it?
>>
>> Also, my entity-list cache on the same view does not seem to keep
>> any items. I am using a FindByCondition object. I follow it in and
>> see that it was stored, but on the subsequent query there is nothing
>> in that cache table.
>>
>> -Al
>>
>>
>> David E. Jones wrote:
>>
>>>
>>> It should be safe to do now. I would do a little test or two to
>>> make sure it is working right, but it should be fine...
>>>
>>> -David
>>>
>>>
>>> On Sep 9, 2004, at 9:25 AM, Al Byers wrote:
>>>
>>>> What is the status of the work Adam was doing to make it safe to
>>>> use cache when using views? I know most of it was put in and I
>>>> haven't seen any activity in that regard, but I don't remember
>>>> ever hearing that it was good to go.
>>>>
>>>> BTW, as a user, thanks, Adam, for an incredibly valuable addition.
>>>>
>>>> -Al
>>>
--
Al Byers
Automation Groups Inc
801.400.5111
http://www.automationgroups.com
byersa at automationgroups.com
We're "Open for Business" (http://www.ofbiz.org)
- the leader in Java-based Web services development tools
More information about the Dev
mailing list