RequestBlockingHandler requestBlockingHandler = new RequestBlockingHandler();
if (!phase.getHandlers().contains(requestBlockingHandler)) {
PhaseRule rule = new PhaseRule("Dispatch");
rule.setAfter("SOAPMessageBodyBasedDispatcher");
rule.setBefore("InstanceDispatcher");
HandlerDescription handlerDesc = requestBlockingHandler.getHandlerDesc();
handlerDesc.setHandler(requestBlockingHandler);
handlerDesc.setName(ClusteringConstants.REQUEST_BLOCKING_HANDLER);
handlerDesc.setRules(rule);
phase.addHandler(requestBlockingHandler);
log.debug("Added " + ClusteringConstants.REQUEST_BLOCKING_HANDLER +
" between SOAPMessageBodyBasedDispatcher & InstanceDispatcher to InFlow");
break;
}
}
}
for (Object o : axisConfig.getInFaultFlowPhases()) {
Phase phase = (Phase) o;
if (phase instanceof DispatchPhase) {
RequestBlockingHandler requestBlockingHandler = new RequestBlockingHandler();
if (!phase.getHandlers().contains(requestBlockingHandler)) {
PhaseRule rule = new PhaseRule("Dispatch");
rule.setAfter("SOAPMessageBodyBasedDispatcher");
rule.setBefore("InstanceDispatcher");
HandlerDescription handlerDesc = requestBlockingHandler.getHandlerDesc();
handlerDesc.setHandler(requestBlockingHandler);
handlerDesc.setName(ClusteringConstants.REQUEST_BLOCKING_HANDLER);
handlerDesc.setRules(rule);
phase.addHandler(requestBlockingHandler);
log.debug("Added " + ClusteringConstants.REQUEST_BLOCKING_HANDLER +
" between SOAPMessageBodyBasedDispatcher & InstanceDispatcher to InFaultFlow");
break;