User: jules_gosnell
Date: 02/04/12 15:25:07
Modified: jetty/src/main/org/jboss/jetty/session ClusteredStore.java
Log:
improved logging and error handling
Revision Changes Path
1.11 +20 -7
contrib/jetty/src/main/org/jboss/jetty/session/ClusteredStore.java
Index: ClusteredStore.java
===================================================================
RCS file:
/cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/session/ClusteredStore.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ClusteredStore.java 12 Apr 2002 20:33:09 -0000 1.10
+++ ClusteredStore.java 12 Apr 2002 22:25:07 -0000 1.11
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: ClusteredStore.java,v 1.10 2002/04/12 20:33:09 jules_gosnell Exp $
+// $Id: ClusteredStore.java,v 1.11 2002/04/12 22:25:07 jules_gosnell Exp $
//----------------------------------------
@@ -57,7 +57,12 @@
public String
nextId()
{
- return _proxy.getSessionId();
+ String id=_proxy.getSessionId();
+
+ if (_log.isDebugEnabled())
+ _log.debug("allocating distributed HttpSession id : "+id);
+
+ return id;
}
public AbstractHttpSessionData
@@ -70,13 +75,21 @@
public AbstractHttpSessionData
get(String id, boolean delete)
{
- if (_log.isDebugEnabled())
- _log.debug("finding distributed HttpSession: "+id);
+ AbstractHttpSessionData data=null;
+ try
+ {
+ data=(AbstractHttpSessionData)_proxy.getHttpSession(id);
- AbstractHttpSessionData
data=(AbstractHttpSessionData)_proxy.getHttpSession(id);
+ if (_log.isDebugEnabled())
+ _log.debug("found distributed HttpSession: "+id);
- if (delete)
- _proxy.removeHttpSession(id);
+ if (delete)
+ _proxy.removeHttpSession(id);
+ }
+ catch (Throwable ignore)
+ {
+ _log.warn("no such HttpSession : "+id);
+ }
return data;
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development