[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-dev
Subject:    [jira] [Commented] (WW-3691) BackgroundProcess should use a
From:       "Falko Modler (Commented) (JIRA)" <jira () apache ! org>
Date:       2011-11-30 23:55:43
Message-ID: 2014097653.28678.1322697343253.JavaMail.tomcat () hel ! zones ! apache ! org
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/WW-3691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13160478#comment-13160478 \
] 

Falko Modler commented on WW-3691:
----------------------------------

Ok, I uploaded the patches.
Test is still missing and I still couldn't test it in conjunction with Spring.

Btw, getNewBackgroundProcess in ExecuteAndWaitInterceptor should be renamed to \
startNewBackgroundProcess. But that might break backwards compatibility.

                
> BackgroundProcess should use a java.util.concurrent.Executor alternatively to \
>                 spawning a new thread
> ---------------------------------------------------------------------------------------------------
>  
> Key: WW-3691
> URL: https://issues.apache.org/jira/browse/WW-3691
> Project: Struts 2
> Issue Type: Improvement
> Components: Core Interceptors
> Affects Versions: 2.2.3.1
> Reporter: Falko Modler
> Attachments: WW-3691.patch, WW-3691_core.txt, WW-3691_showcase.txt
> 
> 
> Every new instance of org.apache.struts2.interceptor.BackgroundProcess spawns a new \
> Thread (see constructor), no thread pooling is used. Besides problems in \
> environments where some container might need to manage the creation of threads, \
> this issue also prevents certain performance/efficiency optimizations via \
> ThreadLocal from taking full effect. E.g.: We use ThreadLocals for Random and \
> SimpleDateFormat and those thread local instances "are lost" when a new Thread is \
> created. Therefore BackgroundProcess should be given a new constructor that takes a \
> java.util.concurrent.Executor instance that is used to execute the Runnable.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: \
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more \
information on JIRA, see: http://www.atlassian.com/software/jira

        


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic