Global glob = (Global)map.get(GlobalInfo.ORIGINAL_ENGINE_GLOBAL);
if (glob == null) {
log.severe("Could not find the ServerScope: can not execute the scheduler job");
}
else {
ReplManagerPlugin plugin = (ReplManagerPlugin)glob.getPluginRegistry().getPlugin(ReplManagerPlugin.getPluginName());
if (plugin == null) {
log.severe("Could not find singleton instance of ReplManagerPlugin: can not execute the scheduler job");
}
else {
if ("startDispatcher".equals(operation)) {
plugin.doExecuteSchedulerJob(true, prefix, dest);
}
else if ("stopDispatcher".equals(operation)) {
plugin.doExecuteSchedulerJob(false, prefix, dest);
}
else {
log.warning("Operation '" + operation + "' not recognized: not doing anything");
}
}