bloritsch 2003/06/11 09:45:55
Modified: event/src/java/org/apache/excalibur/event/command
CommandManager.java
Log:
Last remaining issue
Revision Changes Path
1.28 +11 -1
avalon-excalibur/event/src/java/org/apache/excalibur/event/command/CommandManager.java
Index: CommandManager.java
===================================================================
RCS file:
/home/cvs/avalon-excalibur/event/src/java/org/apache/excalibur/event/command/CommandManager.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- CommandManager.java 11 Jun 2003 16:41:04 -0000 1.27
+++ CommandManager.java 11 Jun 2003 16:45:55 -0000 1.28
@@ -234,6 +234,7 @@
*/
public void dispose()
{
+ m_isAccepting = false;
Object[] remainingElements = m_queue.dequeueAll();
for( int i = 0; i < remainingElements.length; i++ )
{
@@ -363,8 +364,17 @@
}
catch( Exception e )
{
- m_isAccepting =
+ boolean keepProcessing =
getCommandFailureHandler().handleCommandFailure((Command)element, e);
+
+ /* If we are no longer processing, then we clear out the Queue and
refuse to accept
+ * any more commands. Essentially the CommandManager is closed.
+ */
+ if ( ! keepProcessing )
+ {
+ m_isAccepting = false;
+ m_queue.dequeueAll();
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]