aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill
diff options
context:
space:
mode:
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>2006-12-28 09:59:56 +0000
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>2006-12-28 09:59:56 +0000
commitfbd588f3db9dccc62c45eabdf06d3e3aa10bb940 (patch)
tree40ef93183ba52bc61fccf74edd4cbeab9a13cc43 /src/com/itmill
parentebdd400b3f961a4e8ba8f36ac96d4f333d41bf30 (diff)
downloadvaadin-framework-fbd588f3db9dccc62c45eabdf06d3e3aa10bb940.tar.gz
vaadin-framework-fbd588f3db9dccc62c45eabdf06d3e3aa10bb940.zip
Fixed bug #117
svn changeset:173/svn branch:toolkit
Diffstat (limited to 'src/com/itmill')
-rw-r--r--src/com/itmill/toolkit/terminal/web/ApplicationServlet.java19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java b/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java
index 7ed8432ee2..9ea52999aa 100644
--- a/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java
+++ b/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java
@@ -494,6 +494,8 @@ public class ApplicationServlet extends HttpServlet implements
HttpVariableMap variableMap = null;
OutputStream out = response.getOutputStream();
HashSet currentlyDirtyWindowsForThisApplication = new HashSet();
+ WebApplicationContext appContext = null;
+ Application application = null;
try {
// If the resource path is unassigned, initialize it
@@ -510,7 +512,7 @@ public class ApplicationServlet extends HttpServlet implements
return;
// Get the application
- Application application = getApplication(request);
+ application = getApplication(request);
// Create application if it doesn't exist
if (application == null)
@@ -520,7 +522,6 @@ public class ApplicationServlet extends HttpServlet implements
DownloadStream download = null;
// Invoke context transaction listeners
- WebApplicationContext appContext = null;
if (application != null) {
appContext = (WebApplicationContext) application.getContext();
}
@@ -543,10 +544,6 @@ public class ApplicationServlet extends HttpServlet implements
getApplicationManager(application).handleXmlHttpRequest(
request, response);
- // Notify transaction end
- if (appContext != null) {
- appContext.endTransaction(application, request);
- }
return;
}
@@ -731,11 +728,6 @@ public class ApplicationServlet extends HttpServlet implements
handleDownload(download, request, response);
}
- // Notify context of transaction end
- if (appContext != null) {
- appContext.endTransaction(application, request);
- }
-
} catch (UIDLTransformerException te) {
try {
@@ -772,6 +764,11 @@ public class ApplicationServlet extends HttpServlet implements
if (transformer != null)
transformerFactory.releaseTransformer(transformer);
+ // Notify transaction end
+ if (appContext != null && application != null) {
+ appContext.endTransaction(application, request);
+ }
+
// Clean the function library state for this thread
// for security reasons
ThemeFunctionLibrary.cleanState();