/** * Stop the listener. It * <ul> * <li>unbinds the objects from the registry * <li>unexports Remote objects * </ul> */ public void dispose() throws CacheException { if (!status.equals(Status.STATUS_ALIVE)) { return; } try { int counter = 0; synchronized (cachePeers) { for (Iterator iterator = cachePeers.values().iterator(); iterator.hasNext();) { RMICachePeer rmiCachePeer = (RMICachePeer) iterator.next(); disposeRMICachePeer(rmiCachePeer); counter++; } stopRegistry(); } LOG.debug(counter + " RMICachePeers unbound from registry in RMI listener"); status = Status.STATUS_SHUTDOWN; } catch (Exception e) { throw new CacheException("Problem unbinding remote cache peers. Initial cause was " + e.getMessage(), e); } }
/** * Stop the listener. It * <ul> * <li>unbinds the objects from the registry * <li>unexports Remote objects * </ul> */ public void dispose() throws CacheException { if (!status.equals(Status.STATUS_ALIVE)) { return; } try { int counter = 0; synchronized (cachePeers) { for (Iterator iterator = cachePeers.values().iterator(); iterator.hasNext();) { RMICachePeer rmiCachePeer = (RMICachePeer) iterator.next(); disposeRMICachePeer(rmiCachePeer); counter++; } stopRegistry(); } LOG.debug(counter + " RMICachePeers unbound from registry in RMI listener"); status = Status.STATUS_SHUTDOWN; } catch (Exception e) { throw new CacheException("Problem unbinding remote cache peers. Initial cause was " + e.getMessage(), e); } }
/** * Stop the listener. It * <ul> * <li>unbinds the objects from the registry * <li>unexports Remote objects * </ul> */ public void dispose() throws CacheException { if (!status.equals(Status.STATUS_ALIVE)) { return; } try { int counter = 0; synchronized (cachePeers) { for (Iterator iterator = cachePeers.values().iterator(); iterator.hasNext();) { RMICachePeer rmiCachePeer = (RMICachePeer) iterator.next(); disposeRMICachePeer(rmiCachePeer); counter++; } stopRegistry(); } LOG.debug(counter + " RMICachePeers unbound from registry in RMI listener"); status = Status.STATUS_SHUTDOWN; } catch (Exception e) { throw new CacheException("Problem unbinding remote cache peers. Initial cause was " + e.getMessage(), e); } }
/** * Stop the listener. It * <ul> * <li>unbinds the objects from the registry * <li>unexports Remote objects * </ul> */ public void dispose() throws CacheException { if (!status.equals(Status.STATUS_ALIVE)) { return; } try { int counter = 0; synchronized (cachePeers) { for (Iterator iterator = cachePeers.values().iterator(); iterator.hasNext();) { RMICachePeer rmiCachePeer = (RMICachePeer) iterator.next(); disposeRMICachePeer(rmiCachePeer); counter++; } stopRegistry(); } LOG.debug(counter + " RMICachePeers unbound from registry in RMI listener"); status = Status.STATUS_SHUTDOWN; } catch (Exception e) { throw new CacheException("Problem unbinding remote cache peers. Initial cause was " + e.getMessage(), e); } }