IBM Support

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


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,  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
    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:
    The fix for this APAR is currently targeted for inclusion in fix
    pack  Please refer to the Recommended Updates page for
    delivery information:

Temporary fix


APAR Information

  • APAR number


  • Reported component name


  • Reported component ID


  • Reported release


  • Status


  • PE




  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date


  • Closed date


  • Last modified date


  • 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


  • Fixed component ID


Applicable component levels

  • R850 PSY


[{"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