[jboss-user] [JBoss Seam] - Re: @Redirect issues - not redirecting to a page

zzzz8 do-not-reply at jboss.com
Wed Oct 4 02:49:50 EDT 2006


"gavin.king at jboss.com" wrote : Put breakpoints in the Seam code and check that:
  | 
  | (1) ExceptionInterceptor.handled() gets called
  | (2) SeamExceptionFilter.isExceptionHandled() gets called
  | 
  | And tell me what SeamExceptionFilter.isExceptionHandled() returns.

1.  Yes, ExceptionInterceptor.handled() does get called
2.  request.getAttribute("org.jboss.seam.exceptionHandled") returns the ConnectionException object.  Therefore, SeamExceptionFilter.isExceptionHandled(request) returns true.

Consequently, the code segment which invokes it:

public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) 
  |          throws IOException, ServletException
  |    {
  |       try
  |       {
  |          chain.doFilter(request, response);
  |          
  |          //There is a bug in JBoss AS where JBoss does not clean up
  |          //any orphaned tx at the end of the request. It is possible
  |          //that a Seam-managed tx could be left orphaned if, eg.
  |          //facelets handles an exceptions and displays the debug page.
  |          rollbackTransactionIfNecessary(); 
  |       }
  |       catch (Exception e)
  |       {
  |          rollbackTransactionIfNecessary();
  |          endWebRequestAfterException(request);
  |          if ( !isExceptionHandled(request) )
  |          {
  |             log.error("uncaught exception handled by Seam", e);
  |             throw new ServletException(e);
  |          }
  |       }
  |       finally
  |       {
  |          Lifecycle.setPhaseId(null);
  |          log.debug("ended request");
  |       }
  |    }

Because the if condition statement returns false, it then proceeds to the finally block (skipping over the log.error statement and the throw new ServletException statement).

Again, thanks for all the help!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975948#3975948

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975948



More information about the jboss-user mailing list