Using JNDI binding for constants from the server configuration files
You can bind constants into the default Java™ Naming
and Directory Interface (JNDI) namespace from the server configuration files by using the
<jndiEntry>
element on Liberty.
About this task
Documentation for JNDI
binding in version 21.0.0.5 and later is available on the Open Liberty website.
The default JNDI namespace is available in Liberty to provide bindings to miscellaneous objects required by applications. Any data sources declared in the server configuration files are available in the default JNDI namespace. Additionally, you can bind Java strings and primitive data types in the configuration file into JNDI namespace. These constants are then made available to an application at run time, providing a simple and portable way to pass configuration values into the application.
For more information about the JNDI naming, see Naming.