Berin Loritsch wrote:

Done....

Not that I mind with the workload I am currently under. But Hey! Give the rest of us a chance to code sometimes!! :-) But seriously. Thanks.

It looks like the next step is to create a FortressCommandFailureHandler in
Fortress and then set it in the ContextManager.createCommandSink
method.

Something like this:

public class FortressCommandFailureHandler
extends AbstractLogEnabled
implements CommandFailureHandler
{
/**
* Handle a command failure. If a command throws an exception, it has failed. The
* CommandManager will call this method so that we can handle the problem effectively.
*
* @param command The original Command object that failed
* @param throwable The throwable that caused the failure
* @return <code>true</code> if the CommandManager should cease to process commands.
*/
public boolean handleCommandFailure( Command command, Throwable throwable )
{
if ( command instanceof PrepareHandlerCommand )
{
PrepareHandlerCommand phc = (PrepareHandlerCommand)command;
if ( getLogger().isErrorEnabled() )
{
getLogger().error( "Could not prepare ComponentHandler for: " + phc.getHandler().getComponentClass().getName(), e );
}
}
return false;
}
}


The PrepareHandlerCommand would then need to be modified so that it
does not do any logging on its own.  And to provide access to its handler.

We would then need to have a way for user code to override the use of the
FortressCommandFailureHandler.

Is this along the lines of how you were thinking of implementing this?

Cheers,
Leif



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to