comparison artifacts/src/main/java/org/dive4elements/river/artifacts/context/SessionCallContextListener.java @ 8566:fe7e9da6312a

(issue1797) Move close into session release and guard it. To avoid leaking open and Held sessions we centrally close the session in the SessionHolder on release. This also removes some duplicated code in SedDBSessionHolder
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 24 Feb 2015 17:16:14 +0100
parents e4606eae8ea5
children 0a5239a1e46e
comparison
equal deleted inserted replaced
8565:ea17665c5aad 8566:fe7e9da6312a
65 * @param context The CallContext. 65 * @param context The CallContext.
66 */ 66 */
67 public void close(CallContext context) { 67 public void close(CallContext context) {
68 log.debug("SessionCallContextListener.close"); 68 log.debug("SessionCallContextListener.close");
69 69
70 Session session = (Session)context.getContextValue(SESSION_KEY);
71 session.close();
72
73 SessionHolder.release(); 70 SessionHolder.release();
74 } 71 }
75 } 72 }
76 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : 73 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org