applicationContext.stop();
}
}
public static CamelServlet getCamelServlet(String servletName) {
CamelServlet answer = null;
if (servletName != null) {
answer = CAMEL_SERVLET_MAP.get(servletName);
} else {
if (CAMEL_SERVLET_MAP.size() > 0) {
// return the first one servlet
Iterator<CamelServlet> iterator = CAMEL_SERVLET_MAP.values().iterator();
answer = iterator.next();
LOG.info("Since no servlet name is specified, using the first element of camelServlet map [" + answer.getServletName() + "]");
}
}
return answer;
}