You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Martin Cooper (JIRA)" <ji...@apache.org> on 2007/04/29 19:20:15 UTC
[jira] Resolved: (CHAIN-37) The problem of
org.apache.commons.chain.impl.ChainBase.execute
[ https://issues.apache.org/jira/browse/CHAIN-37?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Cooper resolved CHAIN-37.
--------------------------------
Resolution: Won't Fix
Niall is correct. This is as designed.
> The problem of org.apache.commons.chain.impl.ChainBase.execute
> --------------------------------------------------------------
>
> Key: CHAIN-37
> URL: https://issues.apache.org/jira/browse/CHAIN-37
> Project: Commons Chain
> Issue Type: Bug
> Affects Versions: 1.0, 1.1
> Reporter: kylin
> Priority: Critical
>
> The ChainBase.execute metod is not thread safety,I Change the code like that:
> // Execute the commands in this list until one returns true
> // or throws an exception
> boolean saveResult = false;
> Exception saveException = null;
> int i = 0;
> int n = commands.length;
> for (i = 0; i < n; i++) {
> try {
>
> Command command = (Command)commands[i];
>
> Command newCommand = ((Command)commands[i].getClass().newInstance());
>
> PropertyUtils.copyProperties(newCommand,command);
>
> saveResult = newCommand.execute(context);
>
> if (saveResult) {
> break;
> }
> } catch (Exception e) {
> saveException = e;
> break;
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org