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

openjpa.InitializeEagerly breaks bean-validation integration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.0, 2.2.0
    • 2.2.0
    • kernel, validation
    • 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

      Attachments

        1. OPENJPA-1960-test_fix.jar
          51 kB
          Richard G. Curtis

        Activity

          People

            curtisr7 Richard G. Curtis
            gpetracek Gerhard Petracek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: