* <drop/>
*
* @param config the configuration to be updated
*/
public static void setDefaultFaultSequence(SynapseConfiguration config) {
SequenceMediator fault = new SequenceMediator();
fault.setName(org.apache.synapse.SynapseConstants.FAULT_SEQUENCE_KEY);
LogMediator log = new LogMediator();
log.setLogLevel(LogMediator.FULL);
MediatorProperty mp = new MediatorProperty();
mp.setName("MESSAGE");
mp.setValue("Executing default \"fault\" sequence");
log.addProperty(mp);
mp = new MediatorProperty();
mp.setName("ERROR_CODE");
try {
mp.setExpression(new SynapseXPath("get-property('ERROR_CODE')"));
} catch (JaxenException ignore) {}
log.addProperty(mp);
mp = new MediatorProperty();
mp.setName("ERROR_MESSAGE");
try {
mp.setExpression(new SynapseXPath("get-property('ERROR_MESSAGE')"));
} catch (JaxenException ignore) {}
log.addProperty(mp);
fault.addChild(log);
fault.addChild(new DropMediator());
// set aspect configuration
AspectConfiguration configuration = new AspectConfiguration(fault.getName());
fault.configure(configuration);
config.addSequence(org.apache.synapse.SynapseConstants.FAULT_SEQUENCE_KEY, fault);
}