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.
Ask and ye shall receive ;P
It looks like the next step is to create a FortressCommandFailureHandler in Fortress and then set it in the ContextManager.createCommandSink method.
Go for it.
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]
-- "You know the world is going crazy when the best rapper is a white guy, the best golfer is a black guy, The Swiss hold the America's Cup, France is accusing the US of arrogance, and Germany doesn't want to go to war. And the 3 most powerful men in America are named 'Bush', 'Dick', and 'Colon' (sic)".
-----Chris Rock
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
