Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2395

JCR Session not seeing changes made on a different thread when using ModeShape 4.1.0.Final

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 3.8.x-prod-ip6.1, 4.2.0.Final
    • 4.1.0.Final
    • JCR
    • None
    • Hide

      Run the Arquillian Integration test StatelessAsyncBeanIntegrationTest.java (that is included in the PR), using Wildfly 8.1.0.Final and Modeshape.4.1.0.Final

      You will need to update standalone-modeshae.xml with the following Infinispan cache configuration:

      <local-cache name="sample">
          <locking isolation="READ_COMMITTED" striping="false"/>
          <transaction mode="NON_XA" locking="PESSIMISTIC"/>
          <file-store passivation="false" purge="false" path="modeshape/store/sample"/>
      </local-cache> 
      

      If you repeat the test using Wildfly 8.1.0.Final and Modeshape 4.0.0.Final it passes.

      Show
      Run the Arquillian Integration test StatelessAsyncBeanIntegrationTest.java (that is included in the PR), using Wildfly 8.1.0.Final and Modeshape.4.1.0.Final You will need to update standalone-modeshae.xml with the following Infinispan cache configuration: <local-cache name="sample"> <locking isolation="READ_COMMITTED" striping="false"/> <transaction mode="NON_XA" locking="PESSIMISTIC"/> <file-store passivation="false" purge="false" path="modeshape/store/sample"/> </local-cache> If you repeat the test using Wildfly 8.1.0.Final and Modeshape 4.0.0.Final it passes.

    Description

      I'm seeing an issue when using Stateless EJB's with CMT.

      Changes made on thread b (using an Async EJB method) are not always visible on thread a.

      This issue only appears in 4.1.0.Final. The same code works fine in 4.0.0.Final

      Re-creating the issue was not straight forward but I now have an Arquillian test (available in the PR) that demonstrates the issue.

      I have been able to recreate the issue with the following sequence of events

      1. Thread A creates session
      2. Thread A creates JTA transaction
      3. Thread A creates a node under /
      4. Thread A saves session
      5. Thread A commits JTA transaction
      6. Thread A creates JTA transaction
      7. Thread A creates a second node under /
      8. Thread A saves session
      9. Thread A commits JTA transaction
      10. Thread B creates a session
      11. Thread creates JTA transaction
      12. Thread B updates the node
      13. Thread A gets the node and does not see change as expected
      14. Thread B saves the session
      15. Thread B commits JTA transaction
      16. Thread A gets the node again and still does not see change this is not expected.

      If you do not execute steps 1-5 the issue does not appear and if you do not perfume step 13 until after Thread B saves and sessions and commits the JTA transaction you do not see the issue.

      Attachments

        Activity

          People

            hchiorean Horia Chiorean (Inactive)
            ma6rl_jira Richard Lucas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: