Proactive insights, news and tips from Oracle WebLogic Server Support. Learn Oracle from Oracle.

  • November 11, 2015

ONS Configuration in WLS

Stephen Felts

Fast Application Notification (FAN) is
used to provide notification events about services and nodes as they are added
and removed from Oracle Real Application Clusters (RAC) and Oracle Data Guard
environments. The Oracle Notification
System is used as the transport for FAN. You can find all of the details in the following link.


Configuring ONS has been available
for Active GridLink (AGL) since WebLogic Server (WLS) 10.3.6. In recent releases, auto-ONS has been added so that it is no longer required
to explicitly configure ONS and this is generally recommended. There are some cases where it is necessary to
explicitly configure the ONS configuration.  One reason is to specify a
wallet file and password (this cannot be done with auto-ONS).  Another
reason is to explicitly specify the ONS topology or modify the number of connections.

ONS configuration has been enhanced
in WLS 12.2.1. The OnsNodeList value
must be configured either with a single node list or a property node list (new
in WLS 12.2.1), but not both.  If the WLS OnsNodeList contains an equals
sign (=), it is assumed to be a property node list and not a single node

Single Node List:

A comma separated list of ONS daemon listen addresses and ports pairs separated
by colon.



Property Node List:

This string is composed of multiple
records, with each record consisting of a key=value pair and terminated by a
newline ('\n') character.  The following keys can be specified.

  • nodes.<id> A list of nodes representing a unique topology of remote
      ONS servers. <id> specifies a unique identifier for the
    node list -- duplicate entries are ignored. The list of nodes configured in any
    list must not include any nodes configured in any other list for the same client
    or duplicate notifications will be sent and delivered.  The list format is
    a comma separated list of ONS daemon listen addresses and ports pairs separated
    by colon.

  • maxconnections.<id> Specifies the maximum number of concurrent connections
         mainted with the ONS servers. <id> specifies
    the node list to which this parameter applies. The default is 3.

  • active.<id> If true the list is active and connections will
    automatically be established to the configured number of ONS servers. If false
    the list is inactive and will only be used as a fail over list in the event
    that no connections for an active list can be established. An inactive list can
    only serve as a fail over for one active list at a time, and once a single
    connection is re-established on the active list, the fail-over list will revert
    to being inactive. Note that only notifications published by the client after a
    list has failed over   will be sent to the fail over list. <id> specifies
    the node list to which this parameter applies. The default is true.

  • remotetimeout  The timeout period, in milliseconds, for a connection
    to each remote server. If the remote server has not responded within this
    timeout period, the connection will be closed. The default is 30 seconds.

Note that although walletfile
and walletpassword are supported in the string, WLS has separate
configuration elements for these values, OnsWalletFile and

This example that is equivalent to the
above single node list:


If the datasource is configured to
connect to two clusters and receive FAN events from both, for example in the
RAC with Data Guard situation, then two ONS node groups are needed. For example



Remember that the URL needs a
separate ADDRESS_LIST for each cluster and set LOAD_BALANCE=ON per ADDRESS to
expand SCAN names.

When using the administration
console to configure an Active GridLink datasource, it is not possible to
specify a property node list during the creation flow.  Instead, it is
necessary to modify the ONS Node value on the ONS tab after creation.  The
following figure shows a property node list with two groups for two RAC


The following figure shows the
Monitoring page for ONS statistics.  Note that there are two entries, one
for each host and port pair.


The following figure shows the
Monitoring page after testing the rac2 ONS node group.


You can also use WLST to create the
ONS parameter.  Multiple lines in the ONS value need to be separated by
embedded newlines.  This is a complete example for creating an AGL datasource.







cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName)



cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName +
'/JDBCDataSourceParams/' + dsName )

set('JNDINames',jarray.array([String('jdbc/' + dsName )], String))

cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName +
'/JDBCDriverParams/' + dsName


cmo.setDriverName( 'oracle.jdbc.OracleDriver' )


cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName +
'/JDBCConnectionPoolParams/' + dsName )

cmo.setTestTableName('SQL ISVALID')

cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName +
'/JDBCDriverParams/' + dsName + '/Properties/' + dsName )


cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName +
'/JDBCDriverParams/' + dsName + '/Properties/' + dsName + '/Properties/user')


cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName +
'/JDBCDataSourceParams/' + dsName )


cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName +
'/JDBCOracleParams/' + dsName)



cd('/SystemResources/' + dsName )

set('Targets',jarray.array([ObjectName('com.bea:Name=' + 'myserver' +
',Type=Server')], ObjectName))



If you can go with automatically configured ONS, that's desirable but if you need to configure ONS explicitly, WLS 12.2.1 has a lot more power to specify exactly what you need. 

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.