IBM Support

PM67069: JPA SQL QUERY CACHE IS DISABLED WHEN CODE INTENDS TO ENABLE IT: PERSISTENCEPROPERTY OPENJPA.JDBC.QUERYSQLCACHE = TRUE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • In WebSphere Application Server V8.0, JPA code that enables SQL
    cache does not enable the cache.
    
    For example
    
    @PersistenceContext(unitName="="someEjb",
    type=PersistenceContextType.TRANSACTION, properties=
    {
    @PersistenceProperty(name="openjpa.jdbc.QuerySQLCache",
    value="true(EnableStatistics=true)")
    })
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server V8.0 and V8.5                        *
    ****************************************************************
    * PROBLEM DESCRIPTION: Improper processing of parenthesis-     *
    *                      augmented OpenJPA config operations at  *
    *                      EM create level.                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The processing of properties for the creation of an
    EntityManager do not properly handle simple value types that can
    be augmented by parenthesized configuration options.
    For example,
    Map propMap = new HashMap();
    propMap.put("openjpa.jdbc.QuerySQLCache",
    "true(EnableStatistics=true)");
    EntityManager em = emf.createEntityManager(propMap);
    actually results in the creation of an EntityManager instance
    where the Query SQL Cache is disabled. This is because the
    entire value, "true(EnableStatistics=true)" is passed into
    Strings.parse() which returns the result of a Boolean.valueOf()
    operation. Since "true" doesn't match
    "true(EnableStatistics=true)", the call to parse() returns false
    - so in this case, the QuerySQLCache property is set to false
    causing it to be disabled for that instance of EntityManager.
    

Problem conclusion

  • Processing of configuration properties specified at
    EntityManager creation has been fixed to prevent the
    mistranslation of primitive configuration options.
    
    The fix for this APAR is currently targeted for inclusion in
    fix packs 8.0.0.6 and 8.5.0.2.  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

    PM67069

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-06-18

  • Closed date

    2012-09-19

  • Last modified date

    2012-09-19

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    PM80408

Fix information

  • Fixed component name

    WEBSPHERE APP S

  • Fixed component ID

    5724J0800

Applicable component levels

  • R800 PSY

       UP

  • R850 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 October 2021