You can create two types of EAR files with the ATG application assembler, development and standalone. Both types contain all ATG classes needed for the application.

The primary difference is in where the configuration files for Nucleus components are stored:

The two types of EAR files also differ in how they handle output files such as log files and state information.

Use development mode during the development process, when you are making frequent changes to the application, and standalone mode only when you deploy your production site. Later, if you need to update your production site, make changes in your ATG installation and then reassemble and redeploy the standalone EAR file.

Configuration File Sources and ATG-INF

The main differences between development-mode and standalone-mode EAR files are found in the WEBINF/ATGINF directory of the atg_bootstrap.war J2EE module. In this directory, both types of EAR files have a file called dynamo.env, which defines Dynamo environment properties.

In a development-mode EAR, the dynamo.env file contains the following entry, which tells the application to get its configuration from the .properties and XML files in the ATG installation:

atg.dynamo.use-install=true

You can make configuration changes without having to rebuild the EAR file.

In a standalone EAR file, instead of using the ATG installation properties, the ATGINF directory contains directories corresponding to the Dynamo modules included in the application. These directories store the configuration data for the modules, making the EAR file totally self-contained.

Additionally, in a standalone EAR the atg_bootstrap.war/WEBINF/ATGINF directory contains a home/localconfig subdirectory, which replicates the localconfig directory in the ATG installation. This localconfig directory is added to the application’s configuration path, so that any settings stored in localconfig in the ATG installation are also used by the application.

Therefore, you can deploy a standalone EAR on a machine that does not have an ATG installation, although your ability to modify the application without rebuilding the EAR file (which requires an ATG installation) is limited.

Output Files and ATG-Data

Development-mode EAR files write output files to the ATG installation; for example, log files are written by default to the <ATG9dir>/home/logs directory, and JHTML pages are compiled in the <ATG9dir>/home/pagebuild directory.

Standalone EAR files cannot write to the ATG installation, inasmuch as it might not exist. When a standalone EAR file first starts up, it creates an ATGData directory. The ATGData directory contains subdirectories logs, pagebuild, and data, which correspond to directories of the same name in <ATG9dir>/home. The ATGData directory also contains a localconfig subdirectory that is the last entry in the configuration path. This directory is used for any configuration files written out by the EAR file itself. You can add properties files to this directory to modify the application configuration for debugging purposes; otherwise, you should make these changes in the ATG installation, then rebuild and redeploy the EAR file.

By default, the ATGData directory is created in the current working directory of the Java process. If the JVM starts up in different directories, it creates ATGData directories there as well. To specify a location for the directory, set the atg.dynamodatadir system property. For example:

java <arguments>  -Datg.dynamo.data-dir=/var/data/ATG-Data/

These directory structures apply only if you are using the default ATG server. For information about using non-default servers, see Using a Non-Default ATG Server later in this chapter.

 
loading table of contents...