public void postConstruct() {
   Archivist archivist =
       archivistFactory.getArchivist(ModuleType.CAR.toString(), getClassLoader());
   if (!(archivist instanceof AppClientArchivist)) {
     throw new IllegalArgumentException(
         "expected an app client module but "
             + appClientArchive.getURI().toASCIIString()
             + " was recognized by "
             + archivist.getClass().getName());
   }
   appClientArchivist = (AppClientArchivist) archivist;
   setDescriptor(appClientArchivist.getDescriptor());
 }
  private RootDeploymentDescriptor populateDescriptor(
      ReadableArchive archive, Archivist theArchivist, ClassLoader loader)
      throws IOException, SAXParseException, Exception {

    // @@@ Optimize it later.
    // Here the application.xml is read twice for NestedAppClientInfo.
    // Once already in expand() method.

    theArchivist.setAnnotationProcessingRequested(true);

    // @@@ setting of the classloader would trigger annotation processing
    // for appclients that have only partial deployment descriptors or no
    // descriptors at all.
    // Note that the annotation processing is bypassed if the descriptors
    // are meta-complete=true", which will be the case for anything that is
    // generated by the backend, i.e. if the appclient being executed here
    // is a generated jar produced by the appserver, obtained by deploying
    // the original application client and retrieve.
    theArchivist.setClassLoader(loader);

    // open with Archivist./pen(AbstractArchive) to also ensure the
    // validation is not called
    // return archivist.open(archive);
    RootDeploymentDescriptor d = null;
    try {
      d = theArchivist.open(archive);
    } catch (Exception ex) {
      close(); // make sure there is no junk tmp director left
      throw ex;
    }

    // depend on the type of the appclient, additional work needs
    // to be done.
    massageDescriptor();

    theArchivist.setDescriptor((BundleDescriptor) d);
    return d;
  }