82 */ |
82 */ |
83 protected final ModuleManager getModuleManager() { |
83 protected final ModuleManager getModuleManager() { |
84 return (ModuleManager) getServletContext().getAttribute(ModuleManager.SC_ATTR_NAME); |
84 return (ModuleManager) getServletContext().getAttribute(ModuleManager.SC_ATTR_NAME); |
85 } |
85 } |
86 |
86 |
|
87 /** |
|
88 * Gives implementing modules access to the {@link DatabaseFacade}. |
|
89 * @return the database facade |
|
90 */ |
|
91 protected final DatabaseFacade getDatabaseFacade() { |
|
92 return (DatabaseFacade) getServletContext().getAttribute(DatabaseFacade.SC_ATTR_NAME); |
|
93 } |
|
94 |
87 private ResponseType invokeMapping(Method method, HttpServletRequest req, HttpServletResponse resp) |
95 private ResponseType invokeMapping(Method method, HttpServletRequest req, HttpServletResponse resp) |
88 throws IOException, ServletException { |
96 throws IOException, ServletException { |
89 try { |
97 try { |
90 LOG.trace("invoke {}#{}", method.getDeclaringClass().getName(), method.getName()); |
98 LOG.trace("invoke {}#{}", method.getDeclaringClass().getName(), method.getName()); |
91 return (ResponseType) method.invoke(this, req, resp); |
99 return (ResponseType) method.invoke(this, req, resp); |