@Override
  public void handle(ContainerEvent event) {
    try {
      this.writeLock.lock();

      ContainerId containerID = event.getContainerID();
      LOG.debug("Processing " + containerID + " of type " + event.getType());

      ContainerState oldState = stateMachine.getCurrentState();
      ContainerState newState = null;
      try {
        newState = stateMachine.doTransition(event.getType(), event);
      } catch (InvalidStateTransitonException e) {
        LOG.warn(
            "Can't handle this event at current state: Current: ["
                + oldState
                + "], eventType: ["
                + event.getType()
                + "]",
            e);
      }
      if (oldState != newState) {
        LOG.info("Container " + containerID + " transitioned from " + oldState + " to " + newState);
      }
    } finally {
      this.writeLock.unlock();
    }
  }
 @Override
 public void postNotify(Extension extension) {
   super.postNotify(extension);
   if (configurator != null) {
     replaceAnnotatedType(new AnnotatedTypeBuilderImpl<>(configurator).build());
     configurator = null;
   }
   annotatedTypeSet = false;
 }