OpenJPA
  1. OpenJPA
  2. OPENJPA-2101

PersistenceProductDerivation overwrites the RemoteCommitProvider configuration

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1, 2.2.0
    • Fix Version/s: 2.2.0
    • Component/s: kernel
    • Labels:
      None

      Description

      If you set the property openjpa.RemoteCommitProvider to a value distinct from the default (for example "tcp" or "jms"), this value is overwritted with the default "sjvm".

      PersistenceProductDerivation uses a incorrect conditional to check if the value is empty. In this code:

      // If the datacache is enabled, make sure we have a RemoteCommitProvider
      String dc = oconf.getDataCache();
      String rcp = oconf.getRemoteCommitProvider();
      // If the datacache is set and is something other than false
      if (dc != null && dc.equals("false") == false) {
      // If RCP is null or empty, set it to sjvm.
      if (rcp == null || (rcp != null && rcp.equals("") == false))

      { oconf.setRemoteCommitProvider("sjvm"); }

      }

      The last conditional must be

      if (rcp == null || (rcp != null && rcp.equals(""))) {

        Activity

        Hide
        Rick Curtis added a comment -

        Pinaki committed revision 1224948 to trunk to resolve this issue.

        Show
        Rick Curtis added a comment - Pinaki committed revision 1224948 to trunk to resolve this issue.
        Hide
        Albert Lee added a comment -

        Close issue in preparation for 2.2.0 release.

        Show
        Albert Lee added a comment - Close issue in preparation for 2.2.0 release.

          People

          • Assignee:
            Unassigned
            Reporter:
            Pedro Aquilino Sánchez
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 2h
              2h
              Remaining:
              Remaining Estimate - 2h
              2h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development