You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Woonsan Ko (JIRA)" <je...@portals.apache.org> on 2013/07/16 18:36:51 UTC

[jira] [Resolved] (JS2-1283) ServletRequestCleanupService throws RuntimeException when a portlet is rendered asynchronously in parallel mode

     [ https://issues.apache.org/jira/browse/JS2-1283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Woonsan Ko resolved JS2-1283.
-----------------------------

    Resolution: Fixed
    
> ServletRequestCleanupService throws RuntimeException when a portlet is rendered asynchronously in parallel mode
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: JS2-1283
>                 URL: https://issues.apache.org/jira/browse/JS2-1283
>             Project: Jetspeed 2
>          Issue Type: Bug
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>             Fix For: 2.2.3
>
>
> In a load testing, I found the following error logs in jetspeed.log:
> --------------------------------------------------------------------------------------------
> 16:41:23 ERROR WORKER_11 [org.apache.jetspeed.util.ServletRequestCleanupService.addCleanupCallback():61] Registring cleanup callback before ServletRequestCleanupService invoked from filter chain.
> java.lang.RuntimeException
> at org.apache.jetspeed.util.ServletRequestCleanupService.addCleanupCallback(ServletRequestCleanupService.java:56)
> at org.apache.jetspeed.util.ServletRequestThreadLocalCleanupCallback.<init>(ServletRequestThreadLocalCleanupCallback.java:33)
> at org.apache.jetspeed.security.JSSubject.setSubject(JSSubject.java:50)
> at org.apache.jetspeed.security.JSSubject.doAsPrivileged(JSSubject.java:185)
> at org.apache.jetspeed.aggregator.impl.WorkerImpl.run(WorkerImpl.java:172)
> 16:43:49 ERROR WORKER_10 [org.apache.jetspeed.util.ServletRequestCleanupService.addCleanupCallback():61] Registring cleanup callback before ServletRequestCleanupService invoked from filter chain.
> java.lang.RuntimeException
> at org.apache.jetspeed.util.ServletRequestCleanupService.addCleanupCallback(ServletRequestCleanupService.java:56)
> at org.apache.jetspeed.util.ServletRequestThreadLocalCleanupCallback.<init>(ServletRequestThreadLocalCleanupCallback.java:33)
> at org.apache.jetspeed.security.JSSubject.setSubject(JSSubject.java:50)
> at org.apache.jetspeed.security.JSSubject.doAsPrivileged(JSSubject.java:185)
> at org.apache.jetspeed.aggregator.impl.WorkerImpl.run(WorkerImpl.java:172)
> --------------------------------------------------------------------------------------------
> Apparently the async worker thread is not provided with the callbacks thread local list by the filter (ServletRequestCleanupFilter).
> So, to avoid the error, each job execution should be able to initialize and clear every time somehow.
> Also, JSSubject.doAsPrivileged(...) call is made in WorkerImpl currently. The problem is this can call ServletRequestCleanupService.addCleanupCallback() in its #setSubject(..) method. However, it is not recommendable to improve the WorkerImpl to initialize/clean up using ServletRequestCleanupService because a worker class might be provided by the container (e.g, commonj worker monitor) and WorkerImpl is just a default worker thread implementation.
> Therefore, the JSSubject.doAsProviledged(...) call should be moved to the job implementation class as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org