OpenJPA
  1. OpenJPA
  2. OPENJPA-1960

openjpa.InitializeEagerly breaks bean-validation integration

    Details

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

      Description

      <property name="openjpa.InitializeEagerly" value="true"/> breaks the bean-validation integration

      AbstractBrokerFactory#makeReadOnly
      evaluates conf.isInitializeEagerly() which returns true (due to the config) and calls _conf.setReadOnly(Configuration.INIT_STATE_FROZEN)
      + at the end of AbstractBrokerFactory#initializeBroker it gets called again

      that causes:
      the created BrokerFactory gets used as argument for PersistenceProviderImpl#loadValidator which fails (with a warning or an exception depending on the validation-mode configured in the persistence.xml) because the config is in state INIT_STATE_FROZEN

        Activity

        Gerhard Petracek created issue -
        Rick Curtis made changes -
        Field Original Value New Value
        Assignee Rick Curtis [ curtisr7 ]
        Rick Curtis made changes -
        Attachment OPENJPA-1960-test_fix.jar [ 12474011 ]
        Rick Curtis made changes -
        Fix Version/s 2.2.0 [ 12315910 ]
        Affects Version/s 2.2.0 [ 12315910 ]
        Rick Curtis made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Albert Lee made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Rick Curtis
            Reporter:
            Gerhard Petracek
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development