ICEfaces
  1. ICEfaces
  2. ICE-9224

sessionExpiredRedirectURI does not redirect with CDI/Weld

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.3
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: Bridge, Framework
    • Labels:
      None
    • Environment:
      JBoss 6, CDI, Weld
    • Assignee Priority:
      P1
    • Salesforce Case Reference:
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      As noted in the case, it's possible to handle the CDI exception from the client using either the JSF or ICE API for error handling.

      It's also possible to make your own ExceptionHandler that can either remove the exception and let the SessionExpiredException propagate to the client so that the redirect behaves normally or handle the error in some other way.
      Show
      As noted in the case, it's possible to handle the CDI exception from the client using either the JSF or ICE API for error handling. It's also possible to make your own ExceptionHandler that can either remove the exception and let the SessionExpiredException propagate to the client so that the redirect behaves normally or handle the error in some other way.

      Description

      After a CDI Conversation is started the sessionExpireRedirectURI does not redirect the user after the session has expired. If a CDI conversation is not started then the parameter works correctly.

        Activity

        Hide
        Deryk Sinotte added a comment -

        Attaching a modified version of the test case that shows the ExceptionHandler strategy. Source has been included but the libs have been removed to reduce the size.

        Show
        Deryk Sinotte added a comment - Attaching a modified version of the test case that shows the ExceptionHandler strategy. Source has been included but the libs have been removed to reduce the size.
        Hide
        Deryk Sinotte added a comment -

        Since this is not currently seen as a generic solution, we're going to leave it as something for application developers to use. Another case (ICE-9234) has been opened to potentially add a feature for more generic handling for exceptions from Ajax responses.

        Show
        Deryk Sinotte added a comment - Since this is not currently seen as a generic solution, we're going to leave it as something for application developers to use. Another case ( ICE-9234 ) has been opened to potentially add a feature for more generic handling for exceptions from Ajax responses.
        Hide
        Nicklas Karlsson added a comment -

        (Case owner commenting)

        I've used option 2 before but I considered it more of handling a side effect (NonexistingConversationException) than the actual session expiring, I'll give option 1 a spin. What should the web.xml parameters for disabling default popups be for option 1 and 2.

        What I find slightly confusion is that Weld activates the non-transient conversation in a PhaseListener but even if I activate the Filter I have in the original WAR, I can detect the stale session and redirect before the exception is thrown but redirect is still ignored.

        Show
        Nicklas Karlsson added a comment - (Case owner commenting) I've used option 2 before but I considered it more of handling a side effect (NonexistingConversationException) than the actual session expiring, I'll give option 1 a spin. What should the web.xml parameters for disabling default popups be for option 1 and 2. What I find slightly confusion is that Weld activates the non-transient conversation in a PhaseListener but even if I activate the Filter I have in the original WAR, I can detect the stale session and redirect before the exception is thrown but redirect is still ignored.
        Hide
        Arran Mccullough added a comment -

        The following context parameter can be used to disable the default error popups:

        <context-param>
        <param-name>org.icefaces.disableDefaultErrorPopups</param-name>
        <param-value>true</param-value>
        </context-param>

        http://www.icesoft.org/wiki/display/ICE/disableDefaultErrorPopups

        Show
        Arran Mccullough added a comment - The following context parameter can be used to disable the default error popups: <context-param> <param-name>org.icefaces.disableDefaultErrorPopups</param-name> <param-value>true</param-value> </context-param> http://www.icesoft.org/wiki/display/ICE/disableDefaultErrorPopups
        Hide
        Deryk Sinotte added a comment -

        The ICEfaces client-side bridge is looking for a very specific Ajax response to do the redirect. It must be an error containing org.icefaces.application.SessionExpiredException. If anything else arrives as the Ajax response, the redirect does not get triggered. That's why I've created the new case as a potential improvement to allow more flexible error handling on the client.

        I'm not a Weld/CDI expert so I'm not sure about all the conditions that cause NonexistingConversationException to occur so it's best at this point to handle it in the application. I still think option 2 is a legitimate solution as well. It's the mechanism that JSF provides for handling errors triggered via Ajax requests.

        Show
        Deryk Sinotte added a comment - The ICEfaces client-side bridge is looking for a very specific Ajax response to do the redirect. It must be an error containing org.icefaces.application.SessionExpiredException. If anything else arrives as the Ajax response, the redirect does not get triggered. That's why I've created the new case as a potential improvement to allow more flexible error handling on the client. I'm not a Weld/CDI expert so I'm not sure about all the conditions that cause NonexistingConversationException to occur so it's best at this point to handle it in the application. I still think option 2 is a legitimate solution as well. It's the mechanism that JSF provides for handling errors triggered via Ajax requests.

          People

          • Assignee:
            Deryk Sinotte
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: