Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/context/SessionCallContextListener.java @ 8202:e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 05 Sep 2014 12:58:17 +0200 |
parents | af13ceeba52a |
children | fe7e9da6312a |
comparison
equal
deleted
inserted
replaced
8201:4b8c5a08de04 | 8202:e4606eae8ea5 |
---|---|
29 */ | 29 */ |
30 public class SessionCallContextListener implements Listener { | 30 public class SessionCallContextListener implements Listener { |
31 | 31 |
32 public static final String SESSION_KEY = "context.session"; | 32 public static final String SESSION_KEY = "context.session"; |
33 | 33 |
34 /** The logger that is used in this class.*/ | 34 /** The log that is used in this class.*/ |
35 private static Logger logger = | 35 private static Logger log = |
36 Logger.getLogger(SessionCallContextListener.class); | 36 Logger.getLogger(SessionCallContextListener.class); |
37 | 37 |
38 | 38 |
39 public SessionCallContextListener() { | 39 public SessionCallContextListener() { |
40 } | 40 } |
49 * Initializes a ThreadLocal variable that is used to hold sessions. | 49 * Initializes a ThreadLocal variable that is used to hold sessions. |
50 * | 50 * |
51 * @param context The CallContext. | 51 * @param context The CallContext. |
52 */ | 52 */ |
53 public void init(CallContext context) { | 53 public void init(CallContext context) { |
54 logger.debug("SessionCallContextListener.init"); | 54 log.debug("SessionCallContextListener.init"); |
55 | 55 |
56 Session session = SessionHolder.acquire(); | 56 Session session = SessionHolder.acquire(); |
57 | 57 |
58 context.putContextValue(SESSION_KEY, session); | 58 context.putContextValue(SESSION_KEY, session); |
59 } | 59 } |
63 * Closes open sessions of the ThreadLocal variable opened in init(). | 63 * Closes open sessions of the ThreadLocal variable opened in init(). |
64 * | 64 * |
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 logger.debug("SessionCallContextListener.close"); | 68 log.debug("SessionCallContextListener.close"); |
69 | 69 |
70 Session session = (Session)context.getContextValue(SESSION_KEY); | 70 Session session = (Session)context.getContextValue(SESSION_KEY); |
71 session.close(); | 71 session.close(); |
72 | 72 |
73 SessionHolder.release(); | 73 SessionHolder.release(); |