An environment represents physical system configurations and combines server and connection settings into one convenient file. Among other things, environments store user ID and password information, database connection information, and deployment and connection information.
You may define multiple environments in which to work on your model. These environments represent physical system configurations, such as Development, QA, Staging, or Production. Once the environments are defined, you can move easily between the environmental settings. When deploying your model in NexJ Studio, you can select the environment file by clicking the Set Current Server button
-Dserver argument.
The recommended best practice is to use the environment file as a template that stores the configuration options and to use a properties file to specify configuration values. For more information, see Specifying environment properties through a properties file.
Your environment files may be encrypted using NexJ Studio to protect their contents. For more information, see Encrypting deployment files.
Creating a new environment file using NexJ Studio
An environment file must be created before you can begin to configure your model.
To create a new environment file in NexJ Studio:
-
In the Deployment layer, click the Environments tab.
-
Right-click the list field in the Environments tab and select New Environment.
The New Environment dialog opens. -
Give your environment a name and click Finish.
The New Environment dialog closes.
An environment with the name you specified is now listed in the Environments tab. The environment file can also be found in the env folder of the project. You can now add environment arguments to the environment, either using the NexJ Studio environment editor or directly in the source by opening the environment file in a text editor. For a list of environment arguments and an example of environment file source, see Example environment settings for NexJ CRM deployment.
In new environment files, the httpGZip property is not initially set. It is recommended that you set it to true. This improves performance by activating Gzip compression for HTTP traffic and helps minimize network bandwidth use.
This setting is surfaced in NexJ Studio as the Compressed HTTP Response in the Communication tab.
You can split the environment file into separate server and connections files. In the Deployment layer, in the Environments tab, right click the environment file and select Extract to Server/Connections.
Specifying environment properties through a properties file