예제 #1
0
  public void unregister(QName pid) throws BpelEngineException {
    if (__log.isTraceEnabled()) __log.trace("unregister: " + pid);

    try {
      ODEProcess p = _registeredProcesses.remove(pid);
      if (p == null) return;

      // TODO Looks like there are some possible bugs here, if a new version of a process gets
      // deployed, the service will be removed.
      p.deactivate();

      // Remove the process from any services that might reference it.
      // However, don't remove the service itself from the map.
      for (List<ODEProcess> processes : _serviceMap.values()) {
        __log.debug(
            "removing process " + pid + "; handle " + p + "; exists " + processes.contains(p));
        processes.remove(p);
      }

      __log.info(__msgs.msgProcessUnregistered(pid));

    } catch (Exception ex) {
      __log.error(__msgs.msgProcessUnregisterFailed(pid), ex);
      throw new BpelEngineException(ex);
    }
  }