changeset 310:6d2c8915e22c

Finalized the SessionCallContextListener and registered it as CallContext.Listener in the configuration. flys-artifacts/trunk@1693 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 14 Apr 2011 13:11:12 +0000
parents e91873b8b937
children ea3a438a7021
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/conf.xml flys-artifacts/src/main/java/de/intevation/flys/artifacts/context/SessionCallContextListener.java
diffstat 3 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu Apr 14 12:59:21 2011 +0000
+++ b/flys-artifacts/ChangeLog	Thu Apr 14 13:11:12 2011 +0000
@@ -1,3 +1,12 @@
+2011-04-14  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/context/SessionCallContextListener.java:
+	  Added the setup() method that has been added to the interface
+	  description in the last commits.
+
+	* doc/conf/conf.xml: Registered the SessionCallContextListener as
+	  CallContext.Listener.
+
 2011-04-14  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/SessionHolder.java:
--- a/flys-artifacts/doc/conf/conf.xml	Thu Apr 14 12:59:21 2011 +0000
+++ b/flys-artifacts/doc/conf/conf.xml	Thu Apr 14 13:11:12 2011 +0000
@@ -32,6 +32,10 @@
 
     </factories>
 
+    <callcontext-listener
+        name="SessionCallContextListener"
+        description="A CallContext.Listener to open and close Hibernatesessions">de.intevation.flys.artifacts.context.SessionCallContextListener</callcontext-listener>
+
     <artifacts>
         <artifact name="winfo" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="${artifacts.config.dir}/artifacts/winfo.xml" />
     </artifacts>
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/context/SessionCallContextListener.java	Thu Apr 14 12:59:21 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/context/SessionCallContextListener.java	Thu Apr 14 13:11:12 2011 +0000
@@ -2,6 +2,9 @@
 
 import org.apache.log4j.Logger;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+
 import org.hibernate.Session;
 
 import de.intevation.artifacts.CallContext;
@@ -29,6 +32,11 @@
     }
 
 
+    public void setup(Document config, Node listenerConfig) {
+        // nothing to do here
+    }
+
+
     /**
      * Initializes a ThreadLocal variable that is used to hold sessions.
      *

http://dive4elements.wald.intevation.org