code: public void addInstance(Object instance)
              throws Exception
      {
          State currentState = state.get();
          if ((currentState == State.STOPPING) || (currentState == State.STOPPED)) {
              throw new IllegalStateException();
          }
          else {
              startInstance(instance);
              if (methodsMap.get(instance.getClass()).hasFor(PreDestroy.class)) {
                  managedInstances.add(instance);
              }
          }
      }
docs: Add an additional managed instance
  
  @param instance instance to add
  @throws Exception errors