APAR status
Closed as program error.
Error description
If a key is re-used after expiring from a map then null is returned whenever that key is returned from the map. For example, the following test fails: @Test public void expiryTestWithReput() throws MbException { MbLocalMap map = new MbLocalMap(); map.setTTL(1); //create entries that should already have expired Object object1 = new Object(); Object object2 = new Object(); map.put(object1, object2); try { Thread.sleep(1500); } catch(InterruptedException _ ) { } assertFalse(map.containsKey(object1)); assertNull(map.get(object1)); map.put(object1, object2); assertTrue(map.containsKey(object1)); assertEquals(object2, map.get(object1)); }
Local fix
Using the remove() method to remove the expired key from the map allows code to be written which works around the problem.
Problem summary
**************************************************************** USERS AFFECTED: All users of App Connect Enterprise version 12 using MbLocalMap or MbGlobalMap in local mode. Platforms affected: MultiPlatform **************************************************************** PROBLEM DESCRIPTION: <span style="background-color:rgb(255, 255, 255)">When using the cache in local mode, if a key is re-used after expiring from a map then null is </span><span style="background-color:rgb(255, 255, 255)">returned whenever that key is returned from the map, even if a new value is subsequently inserted. For </span><span style="background-color:rgb(255, 255, 255)">example, the following test fails: </span> @Test<span style="background-color:rgb(255, 255, 255)"> </span> <span style="background-color:rgb(255, 255, 255)">public void expiryTestWithReput() throws MbException { </span> <span style="background-color:rgb(255, 255, 255)"> MbLocalMap map = new MbLocalMap(); </span> <span style="background-color:rgb(255, 255, 255)"> map.setTTL(1); //create entries that should already have </span> <span style="background-color:rgb(255, 255, 255)">expired </span> <span style="background-color:rgb(255, 255, 255)"> Object object1 = new Object(); </span> <span style="background-color:rgb(255, 255, 255)"> Object object2 = new Object(); </span> <span style="background-color:rgb(255, 255, 255)"> map.put(object1, object2); </span> <span style="background-color:rgb(255, 255, 255)"> try { Thread.sleep(1500); } catch(InterruptedException _ ) {</span> <span style="background-color:rgb(255, 255, 255)">} </span> <span style="background-color:rgb(255, 255, 255)"> assertFalse(map.containsKey(object1)); </span> <span style="background-color:rgb(255, 255, 255)"> assertNull(map.get(object1)); </span> <span style="background-color:rgb(255, 255, 255)"> </span> <span style="background-color:rgb(255, 255, 255)"> map.put(object1, object2); </span> <span style="background-color:rgb(255, 255, 255)"> assertTrue(map.containsKey(object1)); </span> <span style="background-color:rgb(255, 255, 255)"> assertEquals(object2, map.get(object1)); </span> <span style="background-color:rgb(255, 255, 255)">} </span>
Problem conclusion
Key re-use now functions as expected after expiry from a local cache. --------------------------------------------------------------- The fix is targeted for delivery in the following PTFs: Version Maintenance Level v12.0 12.0.6.0 The latest available maintenance can be obtained from: http://www-01.ibm.com/support/docview.wss?rs=849&uid=swg27006041 If the maintenance level is not yet available,information on its planned availability can be found on: http://www-1.ibm.com/support/docview.wss?rs=849&uid=swg27006308 ---------------------------------------------------------------
Temporary fix
Comments
APAR Information
APAR number
IT41901
Reported component name
APP CONNECT ENT
Reported component ID
5724J0560
Reported release
C00
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2022-08-31
Closed date
2022-10-07
Last modified date
2022-10-07
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
APP CONNECT ENT
Fixed component ID
5724J0560
Applicable component levels
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSDR5J","label":"IBM App Connect Enterprise"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"C00","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
08 October 2022