@Override
  public void start(StartContext context) throws StartException {
    final URL url = connectorXmlDescriptor == null ? null : connectorXmlDescriptor.getUrl();
    deploymentName =
        connectorXmlDescriptor == null ? null : connectorXmlDescriptor.getDeploymentName();
    final File root = connectorXmlDescriptor == null ? null : connectorXmlDescriptor.getRoot();
    DEPLOYMENT_CONNECTOR_LOGGER.debugf("DEPLOYMENT name = %s", deploymentName);
    final AS7RaDeployer raDeployer =
        new AS7RaDeployer(
            context.getChildTarget(),
            url,
            deploymentName,
            root,
            classLoader,
            cmd,
            ijmd,
            deploymentServiceName);
    raDeployer.setConfiguration(config.getValue());

    ClassLoader old = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged();
    try {
      WritableServiceBasedNamingStore.pushOwner(duServiceName);
      WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(classLoader);
      raDeployment = raDeployer.doDeploy();
      deploymentName = raDeployment.getDeploymentName();
    } catch (Throwable t) {
      unregisterAll(deploymentName);
      throw MESSAGES.failedToStartRaDeployment(t, deploymentName);
    } finally {
      WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(old);
      WritableServiceBasedNamingStore.popOwner();
    }

    if (raDeployer.checkActivation(cmd, ijmd)) {
      DEPLOYMENT_CONNECTOR_LOGGER.debugf("Activating: %s", deploymentName);

      ServiceName raServiceName = ConnectorServices.getResourceAdapterServiceName(deploymentName);
      value = new ResourceAdapterDeployment(raDeployment, deploymentName, raServiceName);

      managementRepository.getValue().getConnectors().add(value.getDeployment().getConnector());
      registry.getValue().registerResourceAdapterDeployment(value);

      context
          .getChildTarget()
          .addService(
              raServiceName,
              new ResourceAdapterService(
                  deploymentName, raServiceName, value.getDeployment().getResourceAdapter()))
          .setInitialMode(Mode.ACTIVE)
          .install();
    } else {
      DEPLOYMENT_CONNECTOR_LOGGER.debugf("Not activating: %s", deploymentName);
    }
  }