summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-05-05 16:46:02 (GMT)
committermcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-05-05 16:46:02 (GMT)
commitf1d1f5635a6d452b261c1c29e5c0e43a0320125b (patch)
treea9ad26b49bff10068ce1efd53eddf12381d8416f
parent496f8180e80e6283ef295adcc4a22f95df5ced08 (diff)
downloadmocca-f1d1f5635a6d452b261c1c29e5c0e43a0320125b.zip
mocca-f1d1f5635a6d452b261c1c29e5c0e43a0320125b.tar.gz
mocca-f1d1f5635a6d452b261c1c29e5c0e43a0320125b.tar.bz2
Added ShutdownHandler to BKULocal.
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@727 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/BKURequestHandler.java8
-rw-r--r--BKULocal/src/main/webapp/WEB-INF/applicationContext.xml5
-rw-r--r--BKUOnline/src/main/webapp/WEB-INF/applicationContext.xml2
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/spring/ShutdownHandler.java (renamed from BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ShutdownHandler.java)2
4 files changed, 14 insertions, 3 deletions
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/BKURequestHandler.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/BKURequestHandler.java
index cd81b59..7c6e165 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/BKURequestHandler.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/BKURequestHandler.java
@@ -104,7 +104,6 @@ public class BKURequestHandler extends SpringBKUServlet {
if (redirectURL != null) {
// send redirect and return
resp.sendRedirect(redirectURL);
- return;
}
// wait for the binding processor to finish processing
@@ -117,6 +116,13 @@ public class BKURequestHandler extends SpringBKUServlet {
log.error("Request processing failed.", e);
resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
return;
+ } finally {
+ bindingProcessorManager.removeBindingProcessor(id);
+ }
+
+ if (redirectURL != null) {
+ // already redirected
+ return;
}
resp.setStatus(bindingProcessor.getResponseCode());
diff --git a/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml b/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml
index f85479c..6259025 100644
--- a/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml
+++ b/BKULocal/src/main/webapp/WEB-INF/applicationContext.xml
@@ -191,5 +191,10 @@
</map>
</property>
</bean>
+
+ <!-- Shutdown Event handler -->
+ <bean id="shutdownHandler" class="at.gv.egiz.bku.spring.ShutdownHandler">
+ <property name="bindingProcessorManager" ref="bindingProcessorManager" />
+ </bean>
</beans> \ No newline at end of file
diff --git a/BKUOnline/src/main/webapp/WEB-INF/applicationContext.xml b/BKUOnline/src/main/webapp/WEB-INF/applicationContext.xml
index ab8be2b..6ed5ec3 100644
--- a/BKUOnline/src/main/webapp/WEB-INF/applicationContext.xml
+++ b/BKUOnline/src/main/webapp/WEB-INF/applicationContext.xml
@@ -222,7 +222,7 @@
</bean>
<!-- Shutdown Event handler -->
- <bean id="shutdownHandler" class="at.gv.egiz.bku.online.webapp.ShutdownHandler">
+ <bean id="shutdownHandler" class="at.gv.egiz.bku.spring.ShutdownHandler">
<property name="bindingProcessorManager" ref="bindingProcessorManager" />
</bean>
diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ShutdownHandler.java b/bkucommon/src/main/java/at/gv/egiz/bku/spring/ShutdownHandler.java
index 39d7368..3d48599 100644
--- a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ShutdownHandler.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/spring/ShutdownHandler.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package at.gv.egiz.bku.online.webapp;
+package at.gv.egiz.bku.spring;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;