In some situations, you might want to deploy the same EAR file across various servers, where each server has different configuration requirements. For example, two servers that run Oracle ATG Web Commerce Content Administration both need to deploy to a staging site; however, one requires asset preview, while the other does not. You can assemble a single EAR file for both servers by setting the –layer switch as follows:

-layer preview staging

When you start the applications, you can disable asset preview on one by explicitly specifying the configuration layers you wish to activate on it—in this case staging only. For example, you can run the JBoss run script so it activates only the staging configuration layer as follows: