6 Replies Latest reply on Nov 7, 2006 5:33 AM by Serg Prasolov

    Nested conversation question

    Serg Prasolov Newbie


      I tried to use nested conversation. I took an Issue example and made my CRUD after it. I have a set of Clients, every Client has a set of Addresses. I wanted to organize a CRUD around a selected Client and a nested CRUD around a selected Address.

      But there are situations where this approach fails. When a nested conversation is created (inside a parent one) and destroyed after the request is accomplished, there are an unlocked nested conversation and locked parent one, and the latter is locked by the thread of the last request, say http-

      Then everything is perfect until I do @End of the nested conversation. A different thread is on the stage, say http- It destroys the nested conversation, but cannot unlock the parent, so it stays locked to http- (normal case, ReentrantLock does everything correctly)

      Now any request in any thread different from http- will fail to restore the parent conversation, because Manager.java:536 cannot perform ce.lock(). So, I have a "No stored conversation, or concurrent call to the stored conversation" message, which breaks my understanding how it should work.

      I have several workstation to test this behaviour. Of course, if tomcat creates few threads, say 3, I can miss the error for rather long time. But if there are 100 threads under tomcat, it fails immediately.

      Seam is from cvs (today), JBoss 4.0.5.GA.

      Please clarify what is wrong with my idea of nested conversations...

      (By the way, Issues example works exactly the same way, falling down when I try to view a comment which is just created.)

      I consider getting rid of them at all, but it seems to be very elegant approach - I'd better use it instead of any workarounds...

      Thank you in advance.