[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-3680) Locking issue for ConversationEntry when redirecting at ExceptionFilter

Takayoshi Kimura (JIRA) jira-events at lists.jboss.org
Fri Nov 14 04:06:36 EST 2008

     [ https://jira.jboss.org/jira/browse/JBSEAM-3680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Takayoshi Kimura updated JBSEAM-3680:

    Attachment: test-JBSEAM-3680.diff

How to reproduce:

1) Apply test-JBSEAM-3680.diff to booking project:

$ cd $JBOSS_SEAM_HOME/examples
$ cat test-JBSEAM-3680.diff | patch -p0

2) Build booking application and deploy to JBoss AS

3) Turn off keep-alive

Put maxKeepAliveRequests="1" on 8080 Connector in $JBOSS_HOME/server/$JBOSS_SERVER_CONFIG/deploy/jboss-web.deployer/server.xml

4) Perform load to the 8080 Connector

This helps to switch processing thread after exception redirection. For example with ab (apache bench) command:

$ ab -c 100 -n 10000000 http://localhost:8080/

5) Open the booking application in browser and book hotel

You don't see messages on the main page after redirecting by the exception, and log shows "no stored conversation".

If you skip step #3 and #4, it works fine.

I've deployed AOP trace interceptor (just prints ClassName#method) and see the following:

2008-11-13 22:14:56,961 DEBUG [org.jboss.seam.contexts.FacesLifecycle] (http- >>> Begin JSF request for /seam-booking/hotel.seam
2008-11-13 22:14:56,978 DEBUG [com.redhat.jboss.support.aop.MethodCallTraceInterceptor] (http- org.jboss.seam.core.ConversationEntry#lock
2008-11-13 22:14:57,192 DEBUG [org.jboss.seam.web.ExceptionFilter] (http- running exception handlers
2008-11-13 22:14:57,193 DEBUG [com.redhat.jboss.support.aop.MethodCallTraceInterceptor] (http- org.jboss.seam.core.ConversationEntry#lock
2008-11-13 22:14:57,219 DEBUG [com.redhat.jboss.support.aop.MethodCallTraceInterceptor] (http- org.jboss.seam.core.ConversationEntry#unlock
2008-11-13 22:14:57,228 DEBUG [org.jboss.seam.web.ExceptionFilter] (http- done running exception handlers
2008-11-13 22:14:57,235 DEBUG [org.jboss.seam.contexts.FacesLifecycle] (http- >>> Begin JSF request for /seam-booking/main.seam
2008-11-13 22:14:57,251 DEBUG [com.redhat.jboss.support.aop.MethodCallTraceInterceptor] (http- org.jboss.seam.core.ConversationEntry#lock
2008-11-13 22:14:57,796 DEBUG [com.redhat.jboss.support.aop.MethodCallTraceInterceptor] (http- org.jboss.seam.core.ConversationEntry#lockNoWait

The first request doesn't release the ReentrantLock inside the ConversationEntry properly.

> Locking issue for ConversationEntry when redirecting at ExceptionFilter
> -----------------------------------------------------------------------
>                 Key: JBSEAM-3680
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3680
>             Project: Seam
>          Issue Type: Bug
>          Components: Exception Handling
>    Affects Versions: 2.0.2.SP1
>         Environment: Windows XP SP2, JBoss EAP 4.3
>            Reporter: Hiroyuki Wada
>            Priority: Critical
>         Attachments: test-JBSEAM-3680.diff
> When redirecting at ExceptionFilter, it seems that the ConversationEntry lock is not released.
> Therefore, if next request is processed by the another thread, the thread wait for until unlocking.
> This results in the user being redirected to the no-conversation-view-id after the concurrent-request-timeout expires.
> I checked the Seam 2.0.2.SP1 source. It seems that the unlocking process for ConversationEntry
> is skipped when Exception is thrown from JSF Action that invoked in INVOKE_APPLICATION phase.
> When Exception is not thrown, the lock is release after INVOKE_APPLICATION phase.
> (at method calling "afterResponseComplete(facesContext)" at 249 line of SeamPhaseListener.java)
> When Exception is thrown, this method is not called because of the result of FacesContext#getResponseComplete()
> is FALSE.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list