tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session DeltaSession.java
Date Thu, 12 Feb 2004 21:10:33 GMT
fhanik      2004/02/12 13:10:32

  Modified:    modules/cluster/src/share/org/apache/catalina/cluster/session
                        DeltaSession.java
  Log:
  added binding event error protection, port from StandardSession
  
  Revision  Changes    Path
  1.17      +22 -8     jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java
  
  Index: DeltaSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- DeltaSession.java	6 Feb 2004 17:30:13 -0000	1.16
  +++ DeltaSession.java	12 Feb 2004 21:10:32 -0000	1.17
  @@ -1317,7 +1317,11 @@
           // Call the valueBound() method if necessary
           if ( value instanceof HttpSessionBindingListener ) {
               event = new HttpSessionBindingEvent(this, name, value);
  -            ((HttpSessionBindingListener) value).valueBound(event);
  +            try {
  +                ( (HttpSessionBindingListener) value).valueBound(event);
  +            } catch ( Exception x ) {
  +                log.error("Session binding listener throw an exception",x);
  +            }
           }
           
           // Replace or add this attribute
  @@ -1326,8 +1330,13 @@
           // Call the valueUnbound() method if necessary
           if ((unbound != null) &&
               (unbound instanceof HttpSessionBindingListener)) {
  -            ((HttpSessionBindingListener) unbound).valueUnbound
  -              (new HttpSessionBindingEvent((HttpSession) this, name));
  +            try {
  +                ( (HttpSessionBindingListener) unbound).valueUnbound
  +                    (new HttpSessionBindingEvent( (HttpSession)this, name));
  +            } catch ( Exception x ) {
  +                log.error("Session binding listener throw an exception",x);
  +            }
  +
           }
   
   
  @@ -1641,7 +1650,12 @@
             new HttpSessionBindingEvent((HttpSession) this, name, value);
           if ((value != null) &&
               (value instanceof HttpSessionBindingListener))
  -            ((HttpSessionBindingListener) value).valueUnbound(event);
  +            try {
  +                ( (HttpSessionBindingListener) value).valueUnbound(event);
  +            } catch ( Exception x ) {
  +                log.error("Session binding listener throw an exception",x);
  +            }
  +
   
           // Notify interested application event listeners
           Context context = (Context) manager.getContainer();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message