Configuring connection and Web Configuring files outside the ZIETrans application (ear/war)

For the development and production of ZIETrans, the user uses different connection setting properties (main.hco) or WEL config properties(zietranswelcfg.xml).

With this feature, the user can configure the main.hco and zietranswelcfg.xml outside the ZIETrans application. It replaces the content of the connection file or config file according to their production or development requirements.

The content replacement occurs only once while deploying the ear to the server.

To perform this configuration, the user must keep the files with required content outside the ZIETrans project and provide that path as System Environment Variable with the name ZIETRANS_CONFIG_ENV.

Configuration steps to follow:

  1. Keep the main.hco/ zietranswelcfg.xml file outside the ZIETrans project in the System environment variable path.

    Example:  
    ENVPATH\projName\connections\  
    ENVPATH\projName\welconfig\
      

  2. While handling multiple projects on the same machine, the folder must be created with the project name and add the files.

    Figure 1.
  3. Provide the System Environment variable as ZIETRANS_CONFIG_ENV and modify the path according to the user's requirement, whether production or development.
    Note:
    • Changes in Operating System (OS) Environment Variables requires System Restart.
    • Changes in Environment Variables at the Server level or the Java level require Server Restart.
  4. To replace the connection file, provide the path as

    ENVPATH\ZIETransProjName\connections.

  5. Follow similar steps for configuring the zietranswelcfg.xml. Provide a path as follows:

    ENVPATH\ZIETransProjName\welconfig.

  6. Now, try to deploy the ear in the server. It should pick the contents of files specified in the system environment path and the content gets replaced while deploying to the server.
  7. Users can also replace the content of background connections by keeping those files in the system env path with a proper file name. The content in this file will replace the existing content in background connections.
  8. Once the content is replaced, a new file called projectName.properties will be generated and keeps track of the last modified date of main.hco file or zietranswelcfg.xml file.

    The path of this properties file will be: ENVPATH\PojectName\projectName.properties .

  9. To modify the files present inside the ZIETrans application for the second time, the user must ensure that main.hco/ zietranswelcfg.xml in the environment variable path are modified. After modifying the files, ZIETrans application must be restarted in the runtime for considering the changed files.
Note:

To work this feature properly, Files must be present in the above-mentioned file structure (refer to figure 1).