1 Reply Latest reply on Aug 4, 2012 12:04 PM by miguelzp

    action processing after conversation expiry

    miguelzp

      Hi Weld-Experts,

       

      I was playing with Weld 1.1.8 and AS 7.1.1. I set:

       

      conversation.setTimeout(20000);

       

      = 20s of timeout only.

       

      I fill out my registration form and wait some seconds to be sure that the conversation is expired. Then I press the a4j:commandButton that calls the following action:

       

      @Transactional

          public String processRegistration() {

       

      ....

       

       

      What happens is that the action is completely processed and all stateful objects are still intact.

       

      A NonexistentConversationException is thrown not earlier than at the redirect to the confirmation page.

      This causes the transaction being rolled back - and everybody could be happy.

       

      However I'd prefer that the processRegistration never fires without an active conversation.

       

      Is there a way to avoid processing of the action or to check if the conversation is still active?

       

      Thx.

       

      Miguel

        • 1. Re: action processing after conversation expiry
          miguelzp

          Update:

           

          When the conversation is ended regularly and e.g. I use the back button to fire the action again then the conversation seems to be cleanly destroyed and the NonexistentConversationException is thrown before invoking the action method.

           

          It seems that Weld treats ended conversations different from timed out ones.

           

          Hope someone here can bring some light on this issue...