Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2101

PersistenceProductDerivation overwrites the RemoteCommitProvider configuration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.1, 2.2.0
    • 2.2.0
    • kernel
    • 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(""))) {

      Attachments

        Activity

          People

            Unassigned Unassigned
            paquilino 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