Major
Detail
Major
Detail
Major
#27186
Context-local environment variables: Assigning application properties via JNDI
At present, Top-Logic can only be given additional properties externally via global Java system properties and global Java environment variables.
It should be possible to do this context-locally, i.e. if several applications are running in a container, it should be possible to configure them individually.
Application
It is now possible to specify JNDI variables for the application in the namespace "tl". These are treated like system properties or environment variables. For example, if the Tomcat for the application is given the context file(/var/lib/tomcat9/conf/Catalina/localhost/<context-name>.xml)
<Context> ... <Environment name="tl/tl_storage_path" value="/var/lib/tomcat9/work/myApp" type="java.lang.String" override="false" /> ... </Context>
is given, the ${env:tl_storage_path} property is resolved to the value"/var/lib/tomcat9/work/myApp" at the points in the configuration.
Note here that JNDI variables to be used to populate TopLogic application properties must begin with the "tl/" prefix.
Code migration
- The property"tl.developerMode" (used to put a system into developer mode) has been renamed to"tl_developerMode". Search and replace.
Test
- Build and install BPE as Debian package.
- Expectation: The movement data is under"/var/lib/tomcat9/work/bpe".
- Change one model translation.
- Uninstall BPE and reinstall it again.
- Expectation: The new model translation is still there.