You can create two types of EAR files with the ATG application assembler, development and standalone. Both types contain all of the ATG classes needed for the application.
The primary difference is in where the configuration files for Nucleus components are stored:
In development mode, the application draws its Nucleus configuration information from the ATG installation.
In standalone mode, the application stores its configuration in the EAR file itself.
The two types of EAR files also differ in how they handle output files such as log files, compiled JHTML pages, 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 WEB-INF/ATG-INF
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 ATG-INF
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/WEB-INF/ATG-INF
directory contains a home/localconfig
subdirectory, which replicates the localconfig
directory in the ATG installation. This localconfig
directory is added to the CONFIGPATH of the application 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 doesn’t 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 <ATG2007.3dir>/home/logs
directory, and JHTML pages are compiled in the <ATG2007.3dir>/home/pagebuild
directory.
Standalone EAR files cannot write to the ATG installation, since one may not be present. When a standalone EAR file first starts up, it creates an ATG-Data
directory. The ATG-Data
directory contains subdirectories named logs
, pagebuild
, and data
, which are equivalent to the directories with those names in <ATG2007.3dir>/home
. In addition, the ATG-Data
directory contains a localconfig
subdirectory that is the last entry in the CONFIGPATH. 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, but this is not recommended; instead, make the changes in the ATG installation, and then rebuild and redeploy the EAR file.
By default, the ATG-Data
directory is created in the current working directory of the Java process. If the JVM starts up in different directories, it will create ATG-Data
directories there as well. To specify a location for the directory, set the atg.dynamo-data-dir
System property. For example:
java <arguments> -Datg.dynamo.data-dir=/var/data/ATG-Data/
Note that 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.