job xml can access java system properties with property substitution, but sometimes certain configuration data is available in environment varialbes, but not as system properties. There should be an easy way to access them from job xml.
Accessing environment variables from JSL job xml is useful in cloud environment, where containers/POD expose and exchange configuration data through environment variables.
A workaround is to add a job listener that can add these environment variables to system properties. Note: that will not work, since JSL property resolution happens before job listener's beforeJob method.
Another workaround is to pass these environment variables as batch job parameters for every batch job operations that involves db access.
Or if the user has control over how the java process is launched, add them as command line options.
Yet another workaround is to handle that outside JBeret, earlier in the request cycle, for example, in a ServletContextListener that copies certain environment variables to system properties.