*
* @param mainAxisConfig super-tenant AxisConfiguration
* @throws org.apache.axis2.AxisFault if an error occurs while adding the dispatcher
*/
private void addDispatchers(AxisConfiguration mainAxisConfig) throws AxisFault {
HandlerDescription handlerDescription = new HandlerDescription(MultitenantDispatcher.NAME);
PhaseRule rule = new PhaseRule(PhaseMetadata.PHASE_DISPATCH);
rule.setAfter(HTTPLocationBasedDispatcher.NAME);
rule.setBefore("SynapseDispatcher");
handlerDescription.setRules(rule);
MultitenantDispatcher multitenantDispatcher = new MultitenantDispatcher();
multitenantDispatcher.initDispatcher();
handlerDescription.setHandler(multitenantDispatcher);
List<Phase> inflowPhases
= mainAxisConfig.getInFlowPhases();
for (Phase inPhase : inflowPhases) {
// we are interested about the Dispatch phase in the inflow