IBM Support

PI50341: Using java.sql.Timestamp data type for entity version value requ ESTS CURRENT TIMESTAMP FROM WRONG SYSIBM TABLE IN DB2

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When customer use Timestamp Locking on a JPA entity with
    WebSphere Liberty profile on fix pack 8.5.5.6,  a SELECT
    statement is issued to query the table SYSIBM.SYSTABLES to
    retrieve the current timestamp, which results performance
    degradation. The same behavior is not observed with JPA 2.0
    provider OpenJPA.
    

Local fix

  • Use a 3rd party JPA Provider
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of the JPA 2.1 feature using the  *
    *                  java.sql.Timestamp data type for entity     *
    *                  versions on DB2 platforms                   *
    ****************************************************************
    * PROBLEM DESCRIPTION: Using java.sql.Timestamp data types for *
    *                      JPA 2.1 entity version values on DB2    *
    *                      may result in access denied exceptions  *
    *                      from querying the wrong SYSIMB table.   *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Entities that use the java.sql.Timestamp data type for the
    entity version value request the current timestamp from the
    wrong SYSIBM table on DB2, which can lead to permission access
    exceptions for certain users. Even in the result that permission
    is granted to this table, repeated querying of the database to
    obtain a current timestamp can result in performance degradation
    when using the JPA 2.1 feature.
    

Problem conclusion

  • With this fix, code has been updated in Eclipselink to use the
    "SYSIBM.SYSDUMMY1" table to obtain current timestamp values on
    DB2.
    Additionally, an Eclipselink persistence property
    (eclipselink.locking.timestamp.local.default) was added to turn
    off the default functionality of requesting Timestamps from the
    DB and instead defaults to system time when the property is set.
    To set this in the persistence.xml file you would add this:
    
    <property name="eclipselink.locking.timestamp.local.default"
    value="true" />
    
    When this property is set to true (default is false), current
    Timestamp values will be obtained from the System rather than
    querying the database. This can improve performance when using
    java.sql.Timestamp as the version value for an entity.
    
    Details tracking the delivery of this code to Eclipselink can be
    viewed here:
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=478232
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 8.5.5.9.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI50341

  • Reported component name

    LIBERTY PROFILE

  • Reported component ID

    5724J0814

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-10-11

  • Closed date

    2015-11-17

  • Last modified date

    2017-07-14

  • 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

    LIBERTY PROFILE

  • Fixed component ID

    5724J0814

Applicable component levels

  • R850 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"850","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
14 July 2017