Show
Ignore:
Timestamp:
08/23/10 18:07:41 (21 months ago)
Author:
mtld
Message:

sessionstatuslistener race condition fix, fixed webservices-core lib

Location:
branches/release-0.13.5-before-modinc/pfixcore
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/release-0.13.5-before-modinc/pfixcore

  • branches/release-0.13.5-before-modinc/pfixcore/src/de/schlund/pfixcore/workflow/context/SessionContextImpl.java

    r4202 r5312  
    6161            // Send event to registered listeners 
    6262            try { 
     63                SessionStatusListener[] currentListeners; 
    6364                synchronized (this) { 
    64                     for (SessionStatusListener l : sessionListeners) { 
    65                         l.sessionStatusChanged(new SessionStatusEvent(SessionStatusEvent.Type.SESSION_DESTROYED)); 
    66                     } 
     65                    currentListeners = new SessionStatusListener[sessionListeners.size()]; 
     66                    sessionListeners.toArray(currentListeners); 
     67                } 
     68                for (SessionStatusListener l : currentListeners) { 
     69                    l.sessionStatusChanged(new SessionStatusEvent(SessionStatusEvent.Type.SESSION_DESTROYED)); 
    6770                } 
    6871            } catch(Throwable t) {