예제 #1
0
 /** Uninitialize scope and unregister from parent. */
 public void uninit() {
   log.debug("Un-init scope");
   for (IBasicScope child : children.keySet()) {
     if (child instanceof Scope) {
       ((Scope) child).uninit();
     }
   }
   stop();
   setEnabled(false);
   if (hasParent()) {
     if (parent.hasChildScope(name)) {
       parent.removeChildScope(this);
     }
   }
 }
예제 #2
0
 /**
  * Destroys scope
  *
  * @throws Exception on error
  */
 public void destroy() throws Exception {
   log.debug("Destroy scope");
   if (hasParent()) {
     parent.removeChildScope(this);
   }
   if (hasHandler()) {
     // Because handler can be null when there is a parent handler
     getHandler().stop(this);
   }
   // kill all child scopes
   for (IBasicScope child : children.keySet()) {
     removeChildScope(child);
     if (child instanceof Scope) {
       ((Scope) child).uninit();
     }
   }
 }