diff options
-rw-r--r-- | src/com/vaadin/service/ApplicationContext.java | 1 | ||||
-rw-r--r-- | src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java | 38 |
2 files changed, 21 insertions, 18 deletions
diff --git a/src/com/vaadin/service/ApplicationContext.java b/src/com/vaadin/service/ApplicationContext.java index 244e3d1bdf..76685cc215 100644 --- a/src/com/vaadin/service/ApplicationContext.java +++ b/src/com/vaadin/service/ApplicationContext.java @@ -54,6 +54,7 @@ public interface ApplicationContext extends Serializable { * called before and after each each request related to this session except * when serving static resources. * + * The transaction listener must not be null. * * @see com.vaadin.service.ApplicationContext#addTransactionListener(com.vaadin.service.ApplicationContext.TransactionListener) */ diff --git a/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java b/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java index bcac87e6ad..92488ef9ca 100644 --- a/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java +++ b/src/com/vaadin/terminal/gwt/server/AbstractWebApplicationContext.java @@ -3,22 +3,22 @@ */ package com.vaadin.terminal.gwt.server;
-import java.io.PrintWriter;
-import java.io.Serializable;
-import java.io.StringWriter;
-import java.net.URL;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-
-import javax.servlet.http.HttpSessionBindingEvent;
-import javax.servlet.http.HttpSessionBindingListener;
-
-import com.vaadin.Application;
-import com.vaadin.service.ApplicationContext;
-import com.vaadin.terminal.ApplicationResource;
+import java.io.PrintWriter; +import java.io.Serializable; +import java.io.StringWriter; +import java.net.URL; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; + +import javax.servlet.http.HttpSessionBindingEvent; +import javax.servlet.http.HttpSessionBindingListener; + +import com.vaadin.Application; +import com.vaadin.service.ApplicationContext; +import com.vaadin.terminal.ApplicationResource; /**
* Base class for web application contexts (including portlet contexts) that
@@ -36,8 +36,10 @@ public abstract class AbstractWebApplicationContext implements protected HashMap<Application, AbstractCommunicationManager> applicationToAjaxAppMgrMap = new HashMap<Application, AbstractCommunicationManager>();
- public void addTransactionListener(TransactionListener listener) {
- listeners.add(listener);
+ public void addTransactionListener(TransactionListener listener) { + if (listener != null) { + listeners.add(listener); + }
}
public void removeTransactionListener(TransactionListener listener) {
|