// Check for the fault sequence and add a deafult fault sequence if not present
if (newSynapseConfiguration.getFaultSequence() == null) {
SynapseConfigUtils.setDefaultFaultSequence(newSynapseConfiguration);
}
ServerContextInformation contextInformation = getServerContextInformation();
// set the synapse configuration to the axis2 configuration
newSynapseConfiguration.setAxisConfiguration(axisConfiguration);
Parameter synapseCtxParam = new Parameter(SynapseConstants.SYNAPSE_CONFIG, null);
synapseCtxParam.setValue(newSynapseConfiguration);
MessageContextCreatorForAxis2.setSynConfig(newSynapseConfiguration);
//set up synapse env
Parameter synapseEnvParam = new Parameter(SynapseConstants.SYNAPSE_ENV, null);
Axis2SynapseEnvironment synEnv = new Axis2SynapseEnvironment(configurationContext,
newSynapseConfiguration, contextInformation);
synapseEnvParam.setValue(synEnv);
MessageContextCreatorForAxis2.setSynEnv(synEnv);
if (contextInformation != null) {
// set the new information to the server context
contextInformation.setSynapseEnvironment(synEnv);
contextInformation.setSynapseConfiguration(newSynapseConfiguration);
} else {
throw new IllegalStateException("ServerContextInformation not found");
}
try {