persistence@glassfish.java.net

Re: code review for issue 1053

From: Guy Pelletier <guy.pelletier_at_oracle.com>
Date: Mon, 11 Sep 2006 07:49:53 -0400

Wonseok,

The fix for this issue has been made on our end was to be included in the next persistence drop. It is the same fix you proposed.

Cheers,
Guy
  ----- Original Message -----
  From: Wonseok Kim
  To: persistence_at_glassfish.dev.java.net
  Sent: Monday, September 11, 2006 7:37 AM
  Subject: code review for issue 1053


  Hi, Tom, Marina, other maintainers

  Could you review the proposed fix (below) for this issue?
  [Issue 1053] TopLink Essentials Persistence Property 'toplink.cache.shared.default' not applied

  The fix is simple and I confirmed the fix works in my sample test.
  Could you also run the testcase given in the issue description? I don't know how to add this in entity-persistence-test.

  Thanks
  - Wonseok


  On 11 Sep 2006 11:18:44 -0000, guruwons_at_dev.java.net <guruwons_at_dev.java.net> wrote:
    https://glassfish.dev.java.net/issues/show_bug.cgi?id=1053

    ------- Additional comments from guruwons_at_dev.java.net Mon Sep 11 11:18:44 +0000 2006 -------
    I propose a fix for this:
    * In EntityManagerSetupImpl.updateDescriptorCacheSettings(Map m), sharedMap
    contains shared-cache properties without the prefix "toplink.cache.shared .". So
    to get "toplink.cache.shared.default" value,
    TopLinkProperties.DEFAULT("default") should be used as a key instead of
    TopLinkProperties.CACHE_SHARED_DEFAULT("toplink.cache.shared.default ").

    Index:
    src/java/oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl.java
    ===================================================================
    RCS file:
    /cvs/glassfish/entity-persistence/src/java/oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl.java,v
    retrieving revision 1.40
    diff -c -r1.40 EntityManagerSetupImpl.java
    ***
    src/java/oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl.java 7
    Sep 2006 19:54:31 -0000 1.40
    ---
    src/java/oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl.java 11
    Sep 2006 10:52:43 -0000
    ***************
    *** 374,380 ****
                  hasDefault = true;
              }

    ! String defaultSharedString =
    (String)sharedMap.remove(TopLinkProperties.CACHE_SHARED_DEFAULT );
              Boolean defaultShared = null;
              if(defaultSharedString != null) {
                  defaultShared = Boolean.parseBoolean(defaultSharedString);
    --- 374,380 ----
                  hasDefault = true;
              }

    ! String defaultSharedString =
    (String)sharedMap.remove(TopLinkProperties.DEFAULT);
              Boolean defaultShared = null;
              if(defaultSharedString != null) {
                  defaultShared = Boolean.parseBoolean(defaultSharedString);


    - Wonseok Kim