Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-2902

LockModeType.PESSIMISTIC_WRITE reported as NONE in the logs

    XMLWordPrintable

Details

    • Hide

      1) Set logging to level TRACE.
      2) Make a find call to EntityManager with LockModeType.PESSIMISTIC_WRITE:

      Entity entity = entityManager.find(Entity.class, 1, LockModeType.PESSIMISTIC_WRITE);

      Show
      1) Set logging to level TRACE. 2) Make a find call to EntityManager with LockModeType.PESSIMISTIC_WRITE: Entity entity = entityManager.find(Entity.class, 1, LockModeType.PESSIMISTIC_WRITE);

    Description

      The method getLockModeAsString reports lock mode
      LockModeType.PESSIMISTIC_WRITE as "none".

      This of course is a cosmetic issue, but highly misleading, considering PESSIMISTIC_WRITE is pretty much on the opposite end of the spectrum from NONE. Ie. looking at the logs it's not possible to know if there was the strictest possible lock or no lock at all.

      Attachments

        Activity

          People

            smarlow1@redhat.com Scott Marlow
            zds_jira Jari Juslin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: