// now let's write the application descriptor
ApplicationArchivist archivist = new ApplicationArchivist();
archivist.setDescriptor(application);
archivist.writeRuntimeDeploymentDescriptors(out);
if (application.isLoadedFromApplicationXml()) {
archivist.copyStandardDeploymentDescriptors(in, out);
} else {
archivist.writeStandardDeploymentDescriptors(out);
}
}
}