OpenJPA
  1. OpenJPA
  2. OPENJPA-1296 WriteBehindCache Problems
  3. OPENJPA-1237

WriteBehind configuration exception not thrown when it should be

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.1.0
    • Fix Version/s: None
    • Component/s: writebehind
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      It seems like there should be exception(s) thrown when the new writebehind cache is not configured properly. For example, this is not a valid PU configuration since there is no DataCache specified.

      <persistence-unit name="WriteBehind_JSE_INVALID_PU1">
      <mapping-file>META-INF/orm.xml</mapping-file>
      <properties>
      <property name="openjpa.DataCache" value="false"/>
      <property name="openjpa.WriteBehindCache" value="true"/>
      <property name="openjpa.WriteBehindCallback" value="true(sleepTime=15000)"/>
      </properties>
      </persistence-unit>

      Yet there is no error or exception thrown when this statement is executed:

      emf = Persistence.createEntityManagerFactory("WriteBehind_JSE_INVALID_PU1");

        Activity

        Hide
        Michael Dick added a comment -

        Reopening issues with WriteBehind.

        Show
        Michael Dick added a comment - Reopening issues with WriteBehind.
        Hide
        Donald Woods added a comment -

        Committed by Mike on 8/15 in r804539.

        Show
        Donald Woods added a comment - Committed by Mike on 8/15 in r804539.
        Hide
        Tim McConnell added a comment -

        This third patch will circumvent the adverse impact that these new configuration testcases are having on the other WriteBehind testcases in trunk. That problem will be addressed in another WriteBehind JIRA I'll open momentarily.

        Show
        Tim McConnell added a comment - This third patch will circumvent the adverse impact that these new configuration testcases are having on the other WriteBehind testcases in trunk. That problem will be addressed in another WriteBehind JIRA I'll open momentarily.
        Hide
        Tim McConnell added a comment -

        This second patch includes testcases to ensure that the appropriate WriteBehindConfigurationException is thrown for invalid configurations and an EntityManagerFactory is instantiated for valid configurations. Also, it will now properly throw a WriteBehindConfigurationException in all cases where required WriteBehind configuration parameters are omitted.

        Show
        Tim McConnell added a comment - This second patch includes testcases to ensure that the appropriate WriteBehindConfigurationException is thrown for invalid configurations and an EntityManagerFactory is instantiated for valid configurations. Also, it will now properly throw a WriteBehindConfigurationException in all cases where required WriteBehind configuration parameters are omitted.
        Hide
        Tim McConnell added a comment -

        This patch will force a WriteBehindConfigurationException when the WriteBehind Cache is configured without configuring the DataCache.

        Show
        Tim McConnell added a comment - This patch will force a WriteBehindConfigurationException when the WriteBehind Cache is configured without configuring the DataCache.

          People

          • Assignee:
            Unassigned
            Reporter:
            Tim McConnell
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development