Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1690

Conversation lock not unlocked when ending conversations

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.2.2.Final, 1.1.28.Final
    • 1.1.23.Final, 2.1.2.Final, 2.2.1.Final
    • Conversations
    • None
    • Hide

      deploy the attached reproducer and run "python test.py" , notice the almost 1 second delay for the second response and see the server.log for org.jboss.weld.context.BusyConversationException (instead of the expected org.jboss.weld.context.NonexistentConversationException and no significant delay in the second request )

      Show
      deploy the attached reproducer and run "python test.py" , notice the almost 1 second delay for the second response and see the server.log for org.jboss.weld.context.BusyConversationException (instead of the expected org.jboss.weld.context.NonexistentConversationException and no significant delay in the second request )

      Having a simple bean

      @Model
      public class Controller {
          @Inject
          Conversation conversation;
      
          public void begin() {
              conversation.begin();
          }
      
          public void end() {
              conversation.end();
          }
      

      invoked from a JSF view,

      trying to end the same conversation from two parallel request results in

      org.jboss.weld.context.BusyConversationException: WELD-000322 Conversation lock timed out: 1

      it seems that the lock was not released, thus the second thread keeps waiting for the conversation timeout.

      The expected result (unless the conversation ending really took so long) would be for the second thread to end in org.jboss.weld.context.NonexistentConversationException: WELD-000321: No conversation found to restore for id 1

      Other notes:

      increasing the CONCURRENT_ACCESS_TIMEOUT makes the issue more apparent.

        1. jboss-numberguess.war
          8 kB
          Marek Schmidt
        2. test.py
          3 kB
          Marek Schmidt

            mkouba@redhat.com Martin Kouba
            maschmid@redhat.com Marek Schmidt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: