This blog post was originally posted in the ATG Developer Community in 2008.

Your server farm may have more than one ATG instance running in the same JBOSS server. If you want to define the separate local configuration layer (with the same code base) for each instance you can do like the below.

1. Create a .sh script for each atg instance and inside the script specify the data-directory to use.

e.g:

create a start_atg01.sh shell script and include the following line

./run.sh -c atg01 -Datg.dynamo.data-dir=$JBOSS_HOME/server/atg01/ATG-Data -Datg.dynamo.server.name=atg-01

2. Copy run.conf to x.conf, copy run.sh to start_x.sh, and shutdown.sh to stop_x.sh.

3. In the start_x.sh edit it to point at x.conf, and in stop_x.sh – to point it to the jboss server’s individual jnlp port for shutdown.

4. Add the above -D args (along with JVM tuning params) to the x.conf file.
You can use ATG home/lcoalconfig and home/servers//localconfig under DAS.

It also works to leave the ATG-Data arg the same for all of the jboss instances on the box as well. You can then set up the server property (as in atg server) and it will look under ATG-Data/servers//localconfig. If you name the jboss instance and the atg server directory the same you can use the “-c” arg to set the atg server name. limited # of scripts and changes.

This kind of approach will be useful in the staging environments where we will run different atg applications (per se, one instance running ATG-CSC & other running ATG Commerce) in the same JBoss server.

This approach can also be used if you want to share the same configurations for all the ATG applications running in a JBoss server.