Author: ivol37 at gmail.com
Date: Thu Feb 10 12:24:39 2011
New Revision: 774
Log:
[AMDATU-295] Fixed errors/info messages printed to the console upon shutdown
Modified:
trunk/amdatu-semanticweb/sesame/src/main/java/org/amdatu/semanticweb/sesame/osgi/Activator.java
trunk/amdatu-web/jsp/src/main/java/org/amdatu/web/jsp/service/ResourceProviderJspServlet.java
Modified:
trunk/amdatu-semanticweb/sesame/src/main/java/org/amdatu/semanticweb/sesame/osgi/Activator.java
==============================================================================
---
trunk/amdatu-semanticweb/sesame/src/main/java/org/amdatu/semanticweb/sesame/osgi/Activator.java
(original)
+++
trunk/amdatu-semanticweb/sesame/src/main/java/org/amdatu/semanticweb/sesame/osgi/Activator.java
Thu Feb 10 12:24:39 2011
@@ -41,6 +41,5 @@
@Override
public void destroy(BundleContext context, DependencyManager manager)
throws Exception {
- System.out.println("Stopping Sesame application bundle...");
}
}
Modified:
trunk/amdatu-web/jsp/src/main/java/org/amdatu/web/jsp/service/ResourceProviderJspServlet.java
==============================================================================
---
trunk/amdatu-web/jsp/src/main/java/org/amdatu/web/jsp/service/ResourceProviderJspServlet.java
(original)
+++
trunk/amdatu-web/jsp/src/main/java/org/amdatu/web/jsp/service/ResourceProviderJspServlet.java
Thu Feb 10 12:24:39 2011
@@ -15,7 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
This file was originally published under the Apache 2.0 license as
- org.ops4j.pax.web.jsp.JspServletWrapper. It was copied, modified
+ org.ops4j.pax.web.jsp.JspServletWrapper. It was copied, modified
and redistributed with Amdatu.
*/
package org.amdatu.web.jsp.service;
@@ -100,7 +100,7 @@
if (!found) {
throw new RuntimeException(
- "BundleClassLoader does not implement BundleReference, could
not register JSP servlet");
+ "BundleClassLoader does not implement BundleReference, could not
register JSP servlet");
}
}
@@ -114,12 +114,12 @@
ContextClassLoaderUtils.doWithClassLoader(
m_jasperClassLoader,
new Callable<Void>() {
- public Void call() throws Exception {
- m_jasperServlet.init(config);
- return null;
+ public Void call() throws Exception {
+ m_jasperServlet.init(config);
+ return null;
+ }
}
- }
- );
+ );
}
catch (Exception e) {
m_logService.log(LogService.LOG_ERROR, "Could not initialize Jsp
Servlet", e);
@@ -149,12 +149,12 @@
ContextClassLoaderUtils.doWithClassLoader(
m_jasperClassLoader,
new Callable<Void>() {
- public Void call() throws Exception {
- m_jasperServlet.service(req, res);
- return null;
+ public Void call() throws Exception {
+ m_jasperServlet.service(req, res);
+ return null;
+ }
}
- }
- );
+ );
}
catch (Exception e) {
m_logService.log(LogService.LOG_ERROR, "An error occurred while
handling JSP request", e);
@@ -181,14 +181,13 @@
ContextClassLoaderUtils.doWithClassLoader(
m_jasperClassLoader,
new Callable<Void>() {
- public Void call() throws Exception {
- m_jasperServlet.destroy();
- // TODO How is this an error?
- m_logService.log(LogService.LOG_ERROR, "JSP servlet for "
+ getResourceProvider().getResourceId() + " destroyed");
- return null;
+ public Void call() throws Exception {
+ m_jasperServlet.destroy();
+ m_logService.log(LogService.LOG_INFO, "JSP servlet for
" + getResourceProvider().getResourceId() + " destroyed");
+ return null;
+ }
}
- }
- );
+ );
}
catch (Exception e) {
m_logService.log(LogService.LOG_ERROR, "Could not destroy
JspServletServiceImpl", e);