Data Source System Property Enhancement in WLS 12.2.1


The earlier blog at Setting V$SESSION for a WLS Datasource described using system properties to set driver connection properties, which in turn automatically set values on the Oracle database session.Some comments from readers indicated that there were some limitations to this mechanism.

- There are some values that can’t be set on the command line because they aren’t available until the application server starts.The most obvious value is the process identifier.

- Values set on the command line imply that they are valid for all environments in the server which is fine values like the program name but not appropriate for datasource-specific values or the new partition name that is available with the WLS Multi Tenancy feature.

- In a recent application that I was working with, it was desirable to connect to the server hosting the datasource that was connected to the session so that we could run a graceful shutdownIn this case, additional information was needed to generate the URL.

All of these cases are handled with the enhanced system properties feature.

The original feature supported setting driver properties using the value of system properties.The new feature is overloaded on top of the old feature to avoid introducing yet another set of driver properties in the graphical user interfaces and WLST scripts.It is enabled by specifying one or more of the supported variables listed in the table below into the string value.If one or more of these variables is included in the system property, it is substituted with the corresponding value. Ifa value for the variable is not found, no substitution is performed. If none of these variables are found in the system property, then the value is taken as a system property name.


Value Description


First half (up to @) of ManagementFactory.getRuntimeMXBean().getName()


Second half of ManagementFactory.getRuntimeMXBean().getName()


Java system property


System property


Data source name from the JDBC descriptor. It does not contain the partition name.


Partition name or DOMAIN


WebLogic Server server listen port


WebLogic Server server SSL listen port


WebLogic Server server name


WebLogic Server domain name

A sample property is shown in the following example:




<sys-prop-value>WebLogic ${servername} Partition ${partition}</sys-prop-value>



In this example, v$session.program running on myserver is set to “WebLogic myserver Partition DOMAIN”.

The biggest limitation of this feature is the character limit on the associated columns in v$session.If you exceed the limit, connection creation will fail.

Using this enhancement combined with the Oracle v$session values can make this a powerful feature for tracking information about the source of the connections.