Uploaded image for project: 'JBoss Enterprise Application Platform 6'
  1. JBoss Enterprise Application Platform 6
  2. JBPAPP6-1487

HHH-7287 Problem in caching proper natural-id-values when obtaining result by naturalIdQuery using NaturalIdLoadAccess

    Details

    • Affects:
      Release Notes

      Description

      This could be a valid bug and should be fixed:

      https://hibernate.onjira.com/browse/HHH-7287

      Copying conversation from my mail with the problem escalated on hibernate-dev-list

      The entitymapping information for Person is in file HibernateNativeAPINaturalId2LCachingTestCase.java in string testmapping.
      For convenience I have uploaded the test to my AS7 github as follows:

      https://github.com/madhumita12/jboss-as/blob/master/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/hibernate/naturalid/HibernateNativeAPINaturalId2LCachingTestCase.java

      Files you need to look at:

      HibernateNativeAPINaturalId2LCachingTestCase.java
      SFSB2LcacheNaturalId.java
      Person.java

      This testcase will fail in this branch as it uses hibernate 4.1.2 and in order to run it successfully you could just replace with 4.1.3 hibernate jars after building this branch.

      I have tried to put adequate comments to express my location of confusion.

      Guenther,

      I agree with your reasoning for steps 5 and step 7 as I am using Container Managed Transaction where isolation level (if it is not defined) picks up the default for the underlying Database which is inbuilt H2 for AS7 in this case and default isolation used for H2 is read-committed.

      However as I have already explained in my previous mail I am rather confused/concerned with the discrepancy in behaviour between step 5 and step 6 as step 6 returns me null when I use the same NaturalIdLoadAccess object to load the entity using previous values which looks inconsistent!

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                brmeyer Brett Meyer
                Reporter:
                madhumita12 Madhumita Sadhukhan
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: