APAR status
Closed as program error.
Error description
When Cu call a command that is defined in the cachespec.xml as a
command that will cause the cache to be invalidated, their
traces show that invalidate() gets called before
performExecute()
Recreate Steps:
- start your application that uses the command cache.
Included inthe app server is the CacheMonitor app that comes
with WAS
- run an inquiry transaction that will place something in
the cache
- using the CacheMonitor application, verify that the
command result is in the cache
- place a breakpoint inside the "performExecute" method of
your update command, at the beginning of the method, before any
update work is done
- run an update transaction, hitting the breakpoint, and let
the debugger hold it there
- refresh the CacheMonitor page, and you will see the item
is no longer in the cache
- run an inquiry transaction
- refresh the CacheMonitor page, and you will see the item
back in the cache, and your inquiry page will show the old value
- using the debugger, let the update command finish
- now you have the old wrong value in the cache because the
invalidation happened before the update completed
Local fix
NO Workaround
Problem summary
****************************************************************
* USERS AFFECTED: Dynamic cache users on WebSphere *
* Application Server version 5.0.2.9 and *
* below. *
****************************************************************
* PROBLEM DESCRIPTION: A Command triggers cache invalidations *
* before its "performExecute()" method *
* is called. *
****************************************************************
* RECOMMENDATION: *
****************************************************************
Invalid entries could get cached if a read Command that
results in cache entries gets called during execution and
after the invalidation triggers of an update Command that
modifies the data read by the read Command.
Since invalidations based on the update Command occur before
the performExecute() method is called, a read Command could
potentially read data after the update Command finishes its
invalidations but before the update command commits its
changes, resulting in cache entries with stale data that would
not get invalidated as intended.
Problem conclusion
A flag has been added to the cache policy which can be used to
optionally delay Command invalidations until after the
performExecute() method.
Use the property called "delay-invalidations" at the
cache-entry
level in a policy for a Command resource to delay all
invalidations done by it.
For example:
<cache-entry>
<class>command</class>
<name>UpdateCommand</name>
<cache-id>
<component id="userGroup" type="field" />
<component id="getUserNumber" type="method" />
</cache-id>
<invalidation>USER
<component id="userGroup" type="field" />
<component id="getUserNumber" type="method" />
</invalidation>
<invalidation>GROUP
<component id="userGroup" type="field" />
</invalidation>
<property name="delay-invalidations">true</property>
</cache-entry>
Invalidation Ids for both "USER" and "GROUP" basenames will be
created and called after UpdateCommand executes. If the
delay-invalidations property is not set, the invalidation ids
are created and invalidations occur before the command
executes.
The fix for this APAR is currently targeted for inclusion in
Service Pack 5.0.2.10.
Please refer to the Recommended Updates page for delivery dates:
http://www-1.ibm.com/support/docview.wss?rs=180&context=SSEQTP
&uid=swg27004980
Temporary fix Comments
APAR information |
APAR number |
PQ95567 |
Reported component name |
WAS BASE 5.0 |
Reported component ID |
5630A3600 |
Reported release |
00W |
Status |
CLOSED PER |
PE |
NoPE |
HIPER |
NoHIPER |
Special Attention |
NoSpecatt |
Submitted date |
2004-10-11 |
Closed date |
2004-12-15 |
Last modified date |
2005-03-04 |
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
Publications Referenced
Applicable component levels |
R003 PSY |
UP |
R00A PSY |
UP |
R00H PSY |
UP |
R00I PSY |
UP |
R00P PSY |
UP |
R00S PSY |
UP |
R00W PSY |
UP |
|