5 wsadmin Command Reference

This chapter describes all of the currently available Oracle configuration (OracleMWConfig) and Oracle configuration utility (OracleMWConfigUtilities) commands that you can use with the wsadmin command-line utility. These Oracle-specific commands allow you to create, configure, and modify cells for Oracle Fusion Middleware products, as well as add resources to or delete resources from those cells.

This chapter contains the following sections:

In addition to the wsadmin commands described in this chapter, you can also use wsadmin commands for Oracle Fusion Middleware products that are supported on IBM WebSphere. The commands are identical to the WebLogic Scripting Tool (WLST) commands for these Oracle Fusion Middleware products, although not all of these commands are supported in an IBM WebSphere environment. For more information on these commands, see the following sections in the Oracle Fusion Middleware Third-Party Application Server Guide:

See also the appropriate product chapter in Oracle Fusion Middleware WebLogic Scripting Tool Command Reference or refer to the wsadmin help.

5.1 OracleMWConfig Commands

This section describes the OracleMWConfig commands that you can use with the wsadmin utility to create, configure, and modify cells.

Table 5-1 lists these OracleMWConfig commands.

Table 5-1 OracleMWConfig Commands

Command Description

assign

Assigns the specified application, library, service, or server to the specified target

clone

Creates a new server by cloning the specified server object

copyFile

Copies a file or directory to a location within the IBM WebSphere configuration repository

create

Creates a wrapper object of the specified type with the specified list of attributes

delete

Deletes the specified wrapper object

dumpStack

(Interactive mode only) Displays a stack trace, if one exists, for the last executed command

endConfig

Ends the configuration session

getChildByName

Returns a wrapper object of the specified type, name, and scope

getChildren

Returns a list of wrapper objects of the specified type

getTypes

Returns a list of the supported element types

getValue

Returns the value for the specified attribute

help

Displays a list of all OracleMWConfig commands or displays help for a specified OracleMWConfig command

list

Lists the names of all elements of the specified type, which must be an assignable type

loadTemplates

Loads all the currently selected templates for processing

registerOracleHomes

Registers Oracle home directories on local and remote nodes

retrieveObject

Retrieves the value corresponding to the specified key from the configuration session's ObjectStore

selectTemplate

Selects an Oracle Fusion Middleware configuration template

setValue

Sets the value for the specified attribute

showTemplates

Shows applied and selected templates

startConfig

Starts the configuration session

storeObject

Stores the specified value with the specified key in the configuration session's ObjectStore for later use in the session

suppressException

(Interactive mode only) Suppresses exceptions for a cleaner display

unassign

Unassigns the specified application, service, or server from the specified target

validateConfig

Validates the configuration according to the specified option


5.1.1 assign

Assigns the specified application, library, custom service, or server to a server or cluster object.

Syntax

OracleMWConfig.assign(type, name, wrapper, atts = [])

Argument Definition
type The type of element to be assigned. Valid types are Server, Library, CustomService, and Application.
name The name of the element to be assigned
wrapper The wrapper object of the target (a server or cluster, depending on the type being assigned)
atts A list of attributes of the element to be assigned. Use attributes to clarify the operation; for example, with server to cluster assignment, you can specify the node.

Example

The following example assigns the server server1 to the cluster cluster1.

serverName = 'server1'
clusterName = 'cluster1'
cluster1 = OracleMWConfig.getChildByName('ServerCluster', clusterName)
OracleMWConfig.assign('Server', serverName, cluster1)

5.1.2 clone

Creates a new server by cloning the specified server object. The specified attributes define the server name and node name for the cloned server.

Syntax

OracleMWConfig.clone(serverObject, atts)

Argument Definition
serverObject The server object to clone
atts A list of attributes. Valid attributes are Name and NodeName.

Example

The following example clones a new server (server2) from an existing server (server1) and sets the node name for the new server to TESTNode03.

serverName = 'server1'
server = OracleMWConfig.getChildByName('Server', serverName)
atts = []
atts.append(['Name','server2'])
atts.append(['NodeName','TESTNode03'])
OracleMWConfig.clone(server, atts)

5.1.3 copyFile

Copies a file or directory to a location within the IBM WebSphere configuration repository. For information on this repository, refer to your IBM WebSphere documentation, specifically the documentation for AdminConfig.createDocument and related commands.

Syntax

OracleMWConfig.copyFile(src, scope, wasRelativePath, configGroup)

Argument Definition
src The path of the file or directory to be copied
scope One of these values: cell, node, cluster, or server
wasRelativePath The destination path, which is relative to one of the following paths, depending on the specified scope:
  • If scope is cell:

    profileName/config/cells/cellName/oracle

  • If scope is node:

    profileName/config/cells/cellName/nodes/nodeName

  • If scope is cluster:

    profileName/config/cells/cellName/clusters/clusterName

  • If scope is server:

    profileName/config/cells/cellName/nodes/nodeName/servers/serverName

In these paths, profileName is the name of the Deployment Manager profile for the current wsadmin session, cellName is the name of the cell, nodeName is the name of the current node, clusterName is the name of the current cluster, and serverName is the name of the current server.

configGroup Either None or a server group name that is defined in config-groups.xml. This is ignored if the scope is cell. Server group names are defined in the <domain-topology> element of config-groups.xml, which is located in the following directory:

WAS_HOME/profiles/profileName/config/cells/cellName/oracle/init-info/


Example

This example copies the compDomainDir directory to the fmwconfig directory.

OracleMWConfig.copyFile(compDomainDir, 'cell', 'fmwconfig', None)

This example copies the CompServerDir directory to the fmwconfig directory.

OracleMWConfig.copyFile(compServerDir, 'server', 'fmwconfig', 'JRF-ADMIN-SVR')

5.1.4 create

Creates a wrapper object of the specified type with the specified list of attributes.

Syntax

OracleMWConfig.create(type, atts)

Argument Definition
type The type of element to be created. Use the getTypes command to list valid types.
atts A list of attributes

Example

The following example creates a server wrapper object (newServer) and a JDBC data source wrapper object (newDS).

atts = []
atts.append(['Name','Myserver'])
atts.append(['NodeName','TEST01Node03'])
atts.append(['DevelopmentMode','true'])
newServer = OracleMWConfig.create('Server',atts)

Server : Myserver successfully created

jdbcAtts = []
jdbcAtts.append(['Name','myNewDatasource'])
jdbcAtts.append(['Username','websphere'])
jdbcAtts.append(['Password','welcome1'])
jdbcAtts.append(['DatabaseType', 'Oracle'])
jdbcAtts.append(['DatabaseName', 'orcl'])
jdbcAtts.append(['ServerName', 'example.host.com'])
jdbcAtts.append(['PortNumber', '1521'])
jdbcAtts.append(['IsXa', 'true'])
jdbcAtts.append(['StatementCacheSize', '1024'])
jdbcAtts.append(['AgedTimeout', '12345'])
jdbcAtts.append(['datasourceCustomKey', 'datasourceCustomValue'])
jdbcAtts.append(['JndiName', 'myJNDI'])
jdbcAtts.append(['Server', 'soa_server1'])
newDS = OracleMWConfig.create('JDBC', jdbcAtts)

JDBC: myNewDatasource successfully created

5.1.5 delete

Deletes the specified wrapper object.

Syntax

OracleMWConfig.delete(wrapper)

Argument Definition
wrapper The wrapper object to delete

Examples

The following example deletes the Administration Server (OracleAdminServer).

server = OracleMWConfig.getChildByName('Server','OracleAdminServer')
OracleMWConfig.delete(server)

The following example deletes the SOA Infrastructure data source.

dbinfo = OracleMWConfig.getChildByName('JDBC','SOA Infrastructure')
OracleMWConfig.delete(dbinfo)

5.1.6 dumpStack

This command can be used only in interactive mode; it cannot be used in scripts. It displays a stack trace, if one exists, for the last wsadmin command that was executed. See suppressException for information about how to prevent exceptions from displaying in the console when an error occurs.

Syntax

OracleMWConfig.dumpStack()

Example

The following example shows some of the dumpStack output after specifying an incorrect value for a type argument:

OracleMWConfig.dumpStack()

com.oracle.cie.was.wsadmin.WsadminException: 
com.oracle.cie.was.wsadmin.UnsupportedTypeException: CFGFWK-68049:  The requested 
type Sever is not supported.
        at
com.oracle.cie.was.wsadmin.WsadminState.processCommand(WsadminState.java:193)
.
.
.
        ... 59 more

5.1.7 endConfig

Ends the configuration session by running the relevant wsadmin commands, including a call to AdminConfig.save() for saving all the changes. After this command is executed, it may take several minutes for the configuration changes to be written to the cell.

Syntax

OracleMWConfig.endConfig()

Example

The following example shows a successful save of the cell configuration.

OracleMWConfig.endConfig()

...
CFGFWK-24018:  Successfully saved changes to WebSphere configuration.

5.1.8 getChildByName

Returns a wrapper object of the specified type and name if the scope is not specified; otherwise, returns a wrapper object of the specified type and name within the specified scope.

Syntax

OracleMWConfig.getChildByName(type,name,scope)

Argument Definition
type The child element type. Use the getTypes command to list valid types.
name The child element name
scope Optional. The scope, which can be a server name, cluster name, node name, or cell name. For example, you may need to specify the node name if a specified server name exists on different nodes.

Examples

The following example returns a wrapper object for the OracleAdminServer.

server = OracleMWConfig.getChildByName('Server','OracleAdminServer')

The following example returns a wrapper object for the OracleAdminServer on Test01Node03.

server = OracleMWConfig.getChildByName('Server','OracleAdminServer','TEST01Node03')

5.1.9 getChildren

Returns a list of wrapper objects of the specified type.

Syntax

OracleMWConfig.getChildren(type)

Argument Definition
type The child element type. Use the getTypes command to list valid types

Example

This example lists all servers:

servers  = OracleMWConfig.getChildren('Server')
print servers

Server(dmgr), Server(OracleAdminServer), Server(nodeagent), Server(soa_server1),
Server(test), Server(Myserver)

5.1.10 getTypes

Returns a subset of the child elements of was-config from the config-was schema, plus JDBC.

Syntax

OracleMWConfig.getTypes()

Example

This example shows the output of getTypes().

OracleMWConfig.getTypes()
array(['SIBus', 'Server', 'ServerCluster', 'JDBC', 'ClusterMember'], java.lang.String)

5.1.11 getValue

Returns the value for the specified attribute. See setValue for related information.

Syntax

Object.getValue(attributeName)

Argument Definition
attributeName The name of the attribute whose value you want to retrieve

Example

This example retrieves the node name for the adminServer object, which is defined as the Administration Server (OracleAdminServer).

adminServer = OracleMWConfig.getChildByName('Server','OracleAdminServer')
print adminServer.getValue('NodeName')
 
Node01

5.1.12 help

Displays help information for the specified OracleMWConfig command. If you omit the argument, this command displays the list of OracleMWConfig commands.

For more information about displaying help, see "Using the Oracle Fusion Middleware wsadmin Command-Line Online Help" in Oracle Fusion Middleware Third-Party Application Server Guide.

Syntax

OracleMWConfig.help(topic)

Argument Definition
topic The command for which you want to display help

Example

The following command displays the help for the OracleMWConfig.copyFile command:

print OracleMWConfig.help('copyFile')

Copies a file or directory to a location within WebSphere's configuration
repository.
 
Syntax:
 
OracleMWConfig.copyFile(src, scope, wasRelativePath, configGroup)
src - path of the file or directory to be copied.
scope - one of these values: 'cell', 'node', 'cluster' or 'server'.
wasRelativePath - destination path, which is relative to the 'oracle'
directory within the WebSphere profile.
configGroup - a server group name defined in config-groups.xml.  This is
ignored if the scope is 'cell'.
 
Example:
 
OracleMWConfig.copyFile(compDomainDir, 'cell', 'fmwconfig',
None)OracleMWConfig.copyFile(compServerDir, 'server', 'fmwconfig',
'JRF-ADMIN-SVR')

5.1.13 list

Lists the names of all elements of the specified type, which must be an assignable type.

Syntax

OracleMWConfig.list(assignableType)

Argument Definition
assignableType An assignable type whose elements are to be listed. Valid types are:
  • Application

  • Library

  • CustomService

  • Datasource

  • ResourceAdapter

  • Queue

  • ConnectionFactory

  • TopicConnectionFactory

  • URLProvider

  • WorkManager

  • BusMember

  • Topic

  • ActivationSpec


Example

The following example lists all application elements in the cell.

OracleMWConfig.list('Application')

array(['wsil-wls', 'FMW Welcome Page Application_11.1.0.0.0'], java.lang.String)

5.1.14 loadTemplates

Loads all of the currently selected templates for processing. Run this command after using selectTemplate to select the templates to load.

Syntax

OracleMWConfig.loadTemplates()

Example

The following example shows the output for the loadTemplate command, where one template (Oracle JRF:1.1.0.0) had been selected for loading.

OracleMWConfig.loadTemplates()
 
CFGFWK-24011:  Added template Oracle JRF:1.1.0.0.

5.1.15 registerOracleHomes

Registers Oracle home directories on local and remote nodes. This command should be run at least once from each host system corresponding to an IBM WebSphere node within the cell.

Syntax

OracleMWConfig.registerOracleHomes()

OracleMWConfig.registerOracleHomes(dmgrProfilePath)

Argument Definition
dmgrProfilePath The path to a Deployment Manager profile on the current node

Examples

The following example registers all Oracle home directories as part of the configuration session.

OracleMWConfig.registerOracleHomes()

The following example registers all Oracle home directories in offline mode, independent of the configuration session.

OracleMWConfig.registerOracleHomes(dmgrProfilePath)

5.1.16 retrieveObject

Retrieves the value corresponding to the specified key from the configuration session's ObjectStore. The key-value pair must have been previously stored using the storeObject command.

Syntax

OracleMWConfig.retrieveObject(key)

Argument Definition
key The name of the key whose value you want to retrieve

Example

The following example defines the value for the Admin key, then retrieves the value based on the key name.

adminServer = OracleMWConfig.getChildByName('Server','OracleAdminServer')
OracleMWConfig.storeObject('Admin','adminServer')
OracleMWConfig.retrieveObject('Admin')
 
adminServer

5.1.17 selectTemplate

Selects an Oracle Fusion Middleware configuration template. For information about Oracle Fusion Middleware templates, see Section 1.2.1, "Oracle Fusion Middleware Product Templates."

Syntax

OracleMWConfig.selectTemplate(path)

Argument Definition
path The path of the template JAR file

Example

commonHome = java.lang.System.getProperty("COMMON_COMPONENTS_HOME")
OracleMWConfig.selectTemplate(commonHome + '/common/templates/was/jrf_template_11.1.1.jar')
 
CFGFWK-24010:  Selecting template and all its prerequisites.
CFGFWK-24014:  Currently selected templates are 
                Oracle JRF:1.1.0.0

5.1.18 setValue

Sets the value for the specified attribute.

Syntax

Object.setValue(attributeName, attributeValue)

Argument Definition
attributeName The name of the attribute whose value you want to set
attributeValue The value to which you want to set the attribute

Example

The following example displays the attributes for listenerAddress, displays the current settings for adminListenerAddress, and then sets a new Host value for adminListenerAddress.

adminServer = OracleMWConfig.getChildByName('Server', 'OracleAdminServer')
listenerAddress = adminServer.getChildren('ListenerAddress')
print listenerAddress[0].show()
 
[trw] AdminListenerAddress
[trw] AdminSSLListenerAddress
[trw] HttpListenerAddress
[trw] HttpsListenerAddress
[trw] SoapListenerAddress
[trw] SibListenerAddress
[trw] SibSSLListenerAddress
[trw] BootstrapListenerAddress
adminListenerAddress = listenerAddress[0].getChildren('AdminListenerAddress')
print adminListenerAddress[0].show()
 
[arw] Host [*]
[arw] Port [9001]
[arw] Enable [true]
adminListenerAddress[0].setValue('Host','newhost.domain.com')

5.1.19 showTemplates

Shows Oracle Fusion Middleware configuration templates that were previously applied or are currently selected.

Syntax

OracleMWConfig.showTemplates()

Example

This example shows that there are three previously applied templates and no currently selected templates.

print OracleMWConfig.showTemplates()
 
CFGFWK-24023:  Previously applied templates:
  Oracle CIE Core:11.1.1.0
  Oracle JRF:11.1.1.0
  Oracle SOA Suite:11.1.1.0
CFGFWK-24024:  Currently selected templates:
  None

5.1.20 startConfig

Starts the configuration session by reading relevant data from the cell. You may have to wait several minutes for the cell configuration to load.

Syntax

OracleMWConfig.startConfig()

Example

This example shows the output for startConfig when the cell is successfully loaded.

OracleMWConfig.startConfig()
 
CFGFWK-24012:  Loaded cell configuration.

5.1.21 storeObject

Stores the specified value with the specified key in the configuration session's ObjectStore for later use in the session. The value for a key can be retrieved using retrieveObject.

Syntax

OracleMWConfig.storeObject(key, value)

Argument Definition
key The object key
value The value to assign to this key

Example

The following example creates the adminServer object, and then stores this object as Admin.

adminServer = OracleMWConfig.getChildByName('Server','OracleAdminServer')
OracleMWConfig.storeObject('Admin','adminServer')

5.1.22 suppressException

Use this command only in interactive mode. It suppresses exceptions for a cleaner display. See Section 5.1.6, "dumpStack," for information about how to retrieve error information when suppressing exceptions. When exceptions are suppressed, the exceptions are cached and can be retrieved using dumpStack(). The exception cache is reset for each wsadmin command that is executed.

Syntax

OracleMWConfig.suppressExceptions(suppressExceptions)

Argument Definition
suppressExceptions Set this value to 1 to suppress exceptions. Set this value to 0 to display exceptions.

Example

The following example prevents exceptions from being displayed in the console when an error occurs.

suppressExceptions = 1
OracleMWConfig.suppressExceptions(suppressExceptions)

5.1.23 unassign

Unassigns the specified application, service, library, or server from the specified target. See assign for related information.

Syntax

OracleMWConfig.unassign(type, name, wrapper, atts = [])

Argument Definition
type The type of element to be unassigned. Valid types are:
  • Server

  • Library

  • CustomService

  • Application

name The name of the element to be unassigned
wrapper The wrapper object (a server or cluster, depending on the type being unassigned)
atts An optional list of attributes of the element to be unassigned

Example

The following example unassigns the server server1 from the cluster cluster1.

serverName = 'server1'
clusterName = 'cluster1'
cluster1 = OracleMWConfig.getChildByName('ServerCluster', clusterName)
OracleMWConfig.unassign('Server', serverName, cluster1)

5.1.24 validateConfig

Validates the configuration according to the specified option.

Syntax

OracleMWConfig.validateConfig(optionName)

Argument Definition
optionName The name of the option. The supported options are InternalPortConflict and ExternalPortConflict.

InternalPortConflict checks for port conflicts on the same host, for each host in the cell. For example, if you have two host machines in the cell, it checks for conflicts on host1 and then checks for conflicts on host2.

ExternalPortConflict checks against active processes on each host.


Examples

The following example checks for internal port conflicts, with a successful result.

OracleMWConfig.validateConfig('InternalPortConflict')
 
validateConfig  InternalPortConflict
succeed: validateConfig  InternalPortConflict

The following example checks for external port conflicts, with a successful result.

OracleMWConfig.validateConfig('ExternalPortConflict')
 
validateConfig  ExternalPortConflict
succeed: validateConfig  ExternalPortConflict

5.2 OracleMWConfigUtilities Commands

This section describes the OracleMWConfigUtilities commands that you can use with the wsadmin utility to:

  • Retrieve nodes

  • Configure, modify, and validate end points

  • Configure, modify, and delete JDBC and Oracle RAC data sources and component schemas

  • Configure and modify file store shared directories.

Table 5-2 lists all of the available OracleMWConfigUtilities commands in alphabetic order. The commands are grouped into the following sections:

Table 5-2 OracleMWConfigUtilities Commands

Command Description

convertJdbcNormalDatasourceToRAC

Converts a normal data source or component schema to an Oracle RAC data source

convertJdbcRACToNormalDatasource

Converts an Oracle RAC data source to a normal data source or component schema

createDatasource

Creates a new data source with the specified data source attribute list

deleteDatasource

Deletes the specified data source

getEndPointHostUsingName

Returns the value of the Host attribute of the specified end point for the specified server name and node name

getEndPointHostUsingObject

Returns the value of the Host attribute of the specified end point for the specified server

getEndPointPortUsingName

Returns the value of the Port attribute of the specified end point for the specified server name and node name

getEndPointPortUsingObject

Returns the value of the Port attribute of the specified end point for the specified server

getFileStoreDirectory

Returns the sharable file store directory of the specified type for a cluster name and bus name

getJdbcDatabaseName

Returns the value of the DatabaseName attribute of the specified data source or component schema

getJdbcDatasourceNames

Returns a list of normal JDBC data source instance names

getJdbcDriverClass

Returns the value of the DriverClass attribute of the specified data source or component schema

getJdbcDriverVendor

Returns the value of the DatabaseType attribute of the specified data source or component schema

getJdbcDriverXa

Returns the Boolean value of the IsXa attribute of the specified data source or component schema

getJdbcInstanceType

Returns the string Normal if the specified instance is a normal data source or returns Schema if the specified instance is a component schema

getJdbcIsOracleInstanceType

Returns the Boolean value of the IsOracleInstanceType attribute of the specified data source or component schema

getJdbcPortNumber

Returns the value of the PortNumber attribute of the specified data source or component schema

getJdbcRacServiceName

Returns the Oracle RAC data source service name of the specified data source or component schema

getJdbcSchemaComponentNames

Returns a list of defined component schema instance names

getJdbcServerName

Returns the value of the ServerName attribute of the specified data source or component schema

getJdbcURL

Returns the value of the URL attribute of the specified data source or component schema

getJdbcUsername

Returns the value of the Username attribute of the specified data source or component schema

getLocalNode

Retrieves the host of the current machine, then delegates to the getNodeByHost() function to retrieve a node value

getLogDirectory

Returns the sharable log directory of the specified cluster name and bus name

getNodeByHost

Retrieves the first non-Deployment Manager node that has a matching host name value

getNodeByServer

Retrieves the node of the first server encountered with the specified name

getPermanentStoreDirectory

Returns the sharable permanent store directory of the specified cluster name and bus name

getTemporaryStoreDirectory

Returns the sharable temporary store directory of the specified cluster name and bus name

help

Provides help for the OracleMWConfigUtilities commands

setEndPointHostUsingName

Sets the value of the Host attribute of the specified end point for the specified server name and node name

setEndPointHostUsingObject

Sets the value of the Host attribute of the specified end point for the specified server

setEndPointPortUsingName

Sets the value of the Port attribute of the specified end point for the specified server name and node name

setEndPointPortUsingObject

Sets the value of the Port attribute of the specified end point for the specified server

setFileStoreDirectory

Sets the sharable file store directory of the specified type for the specified cluster name and bus name

setJdbcDatabaseName

Sets the value of the DatabaseName attribute of the specified data source or component schema

setJdbcDriverVendor

Sets the value of the DatabaseType attribute of the specified data source or component schema

setJdbcDriverXa

Sets the value (true or false) of the IsXa attribute of the specified data source or component schema

setJdbcIsOracleInstanceType

Sets the Oracle database URL to be instance type (true) or service type (false) for the specified data source or component schema

setJdbcPassword

Sets the value of the Password attribute of the specified data source or component schema

setJdbcPortNumber

Sets the value of the PortNumber attribute of the specified data source or component schema

setJdbcRacHostsPorts

Sets the Oracle RAC database hosts and ports of the specified Oracle RAC data source or Oracle RAC component schema

setJdbcRacServiceName

Sets the Oracle RAC database service name of the specified Oracle RAC data source or Oracle RAC component schema

setJdbcServerName

Sets the value of the ServerName attribute of the specified data source or component schema

setJdbcUsername

Sets the value of the Username attribute of the specified data source or component schema

setLogDirectory

Sets the sharable log directory for the specified cluster name and bus name

setPermanentStoreDirectory

Sets the sharable permanent store directory for the specified cluster name and bus name

setTemporaryStoreDirectory

Sets the sharable temporary store directory for the specified cluster name and bus name

showEndPointsUsingName

Displays the list of end points of the specified server name and node name

showEndPointsUsingObject

Displays the list of end points of the specified server

showJdbc

Displays the list of configuration settings of the specified data source or component schema

showServer

Displays the child nodes and attributes of the specified server on the specified node

validateJdbc

Validates the JDBC data source and component schema data settings


5.2.1 help

Displays help information for the specified OracleMWConfigUtilities command. If you omit the argument, this command displays the list of OracleMWConfigUtilities commands with descriptions.

For more information about displaying help, see "Using the Oracle Fusion Middleware wsadmin Command-Line Online Help" in Oracle Fusion Middleware Third-Party Application Server Guide.

Syntax

OracleMWConfigUtilities.help(topic)

Argument Definition
topic The command for which you want to display help

Examples

The following example prints a list of all OracleMWConfigUtilities commands with a description for each.

print OracleMWConfigUtilities.help()

The following example prints the help for the getEndPointHostUsingName command.

print OracleMWConfigUtilities.help('getEndPointHostUsingName')

5.2.2 Node Functions

This section describes the following utility functions for retrieving a node:

5.2.2.1 getLocalNode

Retrieves the host name of the current machine, and then calls the getNodeByHost() function to retrieve a node value.

Syntax

OracleMWConfigUtilities.getLocalNode()

Example

The following example shows the output for this command if the local node is Node01.

print OracleMWConfigUtilities.getLocalNode()
 
Node01

5.2.2.2 getNodeByHost

Retrieves the first non-Deployment Manager node that has a matching host name value.

Syntax

OracleMWConfigUtilities.getNodeByHost(hostName)

Argument Description
hostName The host name of the host from which you want to retrieve the node

Example

The following example displays the node name of the example.domain.com host.

print OracleMWConfigUtilities.getNodeByHost(example.domain.com)
 
Node01

5.2.2.3 getNodeByServer

Retrieves the node of the first server encountered with the specified name.

Syntax

OracleMWConfigUtilities.getNodeByServer(serverName)

Argument Description
serverName The name of the server from which you want to retrieve the node

Example

The following example retrieves the node name of the server soa_server1.

print OracleMWConfigUtilities.getNodeByServer('soa_server1')
 
Node01

5.2.3 Server and Endpoint Utility Functions

This section describes the following utility functions, which are used to manage server end points.

5.2.3.1 showEndPointsUsingName

Displays the list of end points for the specified server name and node name.

Syntax

OracleMWConfigUtilities.showEndPointsUsingName(serverName, nodeName)

Argument Definition
serverName The name of the server
nodeName The name of the node

Example

The following example displays the list of end points for the server OracleAdminServer on the TEST01Node03 node.

print OracleMWConfigUtilities.showEndPointsUsingName('OracleAdminServer','TEST01Node03')
 
[trw] AdminListenerAddress
[trw] AdminSSLListenerAddress
[trw] HttpListenerAddress
[trw] HttpsListenerAddress
[trw] SoapListenerAddress
[trw] SibListenerAddress
[trw] SibSSLListenerAddress
[trw] BootstrapListenerAddress
[trw] OrbListenerAddress
[trw] SasSSLServerAuthListenerAddress
[trw] Cisv2SSLServerAuthListenerAddress
[trw] Cisv2SSLMutualAuthListenerAddress
[trw] DcsUnicastListenerAddress
[trw] SipListenerAddress
[trw] SipSSLListenerAddress
[trw] SibMQListenerAddress
[trw] SibMQSSLListenerAddress
[trw] IpcListenerAddress
[trw] NodeDiscoveryListenerAddress
[trw] NodeMulticastListenerAddress
[trw] NodeIPV6ListenerAddress

5.2.3.2 showEndPointsUsingObject

Displays the list of end points for the specified server.

Syntax

OracleMWConfigUtilities.showEndPointsUsingObject(serverObject)

Argument Definition
serverObject The server object

Example

The following example displays the list of end points for the OracleAdminServer server.

server = OracleMWConfig.getChildByName('Server','OracleAdminServer')
print OracleMWConfigUtilities.showEndPointsUsingObject(server)
 
[trw] AdminListenerAddress
[trw] AdminSSLListenerAddress
[trw] HttpListenerAddress
[trw] HttpsListenerAddress
[trw] SoapListenerAddress
[trw] SibListenerAddress
[trw] SibSSLListenerAddress
[trw] BootstrapListenerAddress
[trw] OrbListenerAddress
[trw] SasSSLServerAuthListenerAddress
[trw] Cisv2SSLServerAuthListenerAddress
[trw] Cisv2SSLMutualAuthListenerAddress
[trw] DcsUnicastListenerAddress
[trw] SipListenerAddress
[trw] SipSSLListenerAddress
[trw] SibMQListenerAddress
[trw] SibMQSSLListenerAddress
[trw] IpcListenerAddress
[trw] NodeDiscoveryListenerAddress
[trw] NodeMulticastListenerAddress
[trw] NodeIPV6ListenerAddress

5.2.3.3 showServer

Displays the child nodes and attributes for the specified server on the specified node.

Syntax

OracleMWConfigUtilities.showServer(serverName, nodeName)

Argument Definition
serverName The name of the server
nodeName The name of the node

Example

The following example displays the attributes for the myServer server on the TEST01Nod03 node.

OracleMWConfigUtilities.showServer('myServer', 'TEST01Node03')
 
[ar-] Name [soa_server1]
[ar-] NodeName [adc6140173Node02]
[arw] DevelopmentMode [false]
[trw] ListenerAddress

5.2.3.4 getEndPointHostUsingName

Returns the value of the Host attribute of the specified end point for the specified server name and node name.

Syntax

OracleMWConfigUtilities.getEndPointHostUsingName(serverName, nodeName, endPointName)

Argument Definition
serverName The name of the server
nodeName The name of the node
endPointName The name of the end point

Example

The following example returns the value of the Host attribute for the SoapListenerAddress end point on the OracleAdminServer server on node TEST01Node03.

host = OracleMWConfigUtilities.getEndPointHostUsingName
('OracleAdminServer','TEST01Node03','SoapListenerAddress')
print host
 
myserver.domain.com

5.2.3.5 getEndPointHostUsingObject

Returns the value of the Host attribute of the specified end point for the specified server.

Syntax

OracleMWConfigUtilities.getEndPointHostUsingObject(serverObject,endPointName)

Argument Definition
serverObject The server object
endPointName The name of the end point

Example

The following example returns the value of the Host attribute for the SoapListenerAddress end point for the OracleAdminServer server.

server = OracleMWConfig.getChildByName('Server','OracleAdminServer')
print OracleMWConfigUtilities.getEndPointHostUsingObject(server,'SoapListenerAddress')
 
'myserver.domain.com'

5.2.3.6 getEndPointPortUsingName

Returns the value of the Port attribute of the specified end point for the specified server name and node name.

Syntax

OracleMWConfigUtilities.getEndPointPortUsingName(serverName, nodeName,endPointName)

Argument Definition
serverName The name of the server
nodeName The name of the node
endPointName The name of the end point

Example

The following example returns the value of the Port attribute for the SoapListenerAddress end point for the OracleAdminServer server name on the TEST01Node01 node.

print OracleMWConfigUtilities.getEndPointPortUsingName('OracleAdminServer','TEST01Node01','SoapListenerAddress')
 
8882

5.2.3.7 getEndPointPortUsingObject

Returns the value of the Port attribute of the specified end point for the specified server.

Syntax

OracleMWConfigUtilities.getEndPointPortUsingObject(server, endPointName)

Argument Definition
server The server object
endPointName The name of the end point

Example

The following example returns the value of the Port attribute for the SoapListenerAddress end point on the OracleAdminServer server.

server = OracleMWConfig.getChildByName('Server','OracleAdminServer')
print OracleMWConfigUtilities.getEndPointHostUsingObject(server,'SoapListenerAddress')
 
8882

5.2.3.8 setEndPointHostUsingName

Sets the value of the Host attribute of the specified end point for the specified server and node.

Syntax

OracleMWConfigUtilities.setEndPointHostUsingName(serverName, nodeName,endPointName,hostValue)

Argument Definition
serverName The name of the server
nodeName The name of the node
endPointName The name of the end point
hostValue The host value, which may be localhost, the host name, or an IP address

Example

The following example sets the value of the Host attribute of the SoapListenerAddress end point for the OracleAdminServer server on the TEST01Node03 node.

OracleMWConfigUtilities.setEndPointHostUsingName('OracleAdminServer','TEST01Node03','SoapListenerAddress','myserver.domain.com')
 
Host Name myserver.domain.com for SoapListenerAddress is set.

5.2.3.9 setEndPointHostUsingObject

Sets the value of the Host attribute of the specified end point for the specified server.

Syntax

OracleMWConfigUtilities.setEndPointHostUsingObject(serverObject, endPointName, hostValue)

Argument Definition
serverObject The server object
endPointName The name of the end point
hostValue The host value, which may be localhost, the host name, or an IP address

Example

The following example sets the value of the Host attribute of the HttpListenerAddress end point for the OracleAdminServer server.

server = OracleMWConfig.getChildByName('Server','OracleAdminServer')
OracleMWConfigUtilities.setEndPointHostUsingObject(server,'HttpListenerAddress',
'localhost')
 
Host Name localhost for HttpListenerAddress is set.

5.2.3.10 setEndPointPortUsingName

Sets the value of the Port attribute of the specified end point for the specified server name and node name.

Syntax

OracleMWConfigUtilities.setEndPointPortUsingName(serverName, nodeName, endPointName, portValue)

Argument Definition
serverName The name of the server
nodeName The name of the node
endPointName The name of the end point
portValue The value to which to set the port

Example

The following example sets the value of the Port attribute of the HttpListenerAddress end point for the OracleAdminServer server on the TEST01Node03 node.

OracleMWConfigUtilities.setEndPointPortUsingName('OracleAdminServer',
'TEST01Node03','HttpListenerAddress','9999')

Port 9999 for a HttpListenerAddress is set.

5.2.3.11 setEndPointPortUsingObject

Sets the value of the Port attribute of the specified end point for the specified server.

Syntax

OracleMWConfigUtilities.setEndPointPortUsingObject(serverObject, endPointName, portValue)

Argument Definition
serverObject The server object
endPointName The name of the end point
portValue The value to which to set the port

Example

The following example sets the value of the Port attribute for the HttpListenerAddress end point for the OracleAdminServer server.

server = OracleMWConfig.getChildByName('Server','OracleAdminServer')
OracleMWConfigUtilities.setEndPointPortUsingObject(server,
'HttpListenerAddress','9999')

Port 9999 for a HttpListenerAddress is set.

5.2.4 JDBC Utility Functions

This section describes the following commands, which are used to manage JDBC data sources.

5.2.4.1 getJdbcDatasourceNames

Returns a list of normal JDBC data source instances.

Syntax

OracleMWConfigUtilities.getJdbcDatasourceNames()

Example

The following example indicates that there is only one normal JDBC data source in the cell configuration.

print OracleMWConfigUtilities.getJdbcDatasourceNames()
 
['TestNormalDatasource1']

5.2.4.2 getJdbcSchemaComponentNames

Returns a list of component schema instance names. It does not include any normal data source instance names.

Syntax

OracleMWConfigUtilities.getJdbcSchemaComponentNames()

Example

The following example indicates that there are four schemas in the cell configuration.

print OracleMWConfigUtilities.getJdbcSchemaComponentNames()
 
['SOA Infrastructure', 'User Messaging Service', 'SOA MDS Schema', 
'OWSM MDS Schema']

5.2.4.3 showJdbc

Displays the list of configuration settings for the specified data source or component schema.

Syntax

OracleMWConfig.showJdbc(datasourceOrSchemaComponentName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema

Example

The following example displays the list of configuration settings for the SOADatasource data source.

print OracleMWConfig.showJdbc('SOADatasource')

CFGFWK-68073:  The value of attribute Password is not allowed to be read.
[ar-] Name [SOADatasource]
[ar-] Type [Normal]
[arw] Username [websphere]
[a-w] Password [********]
[arw] DatabaseName [lnrac1]
[arw] ServerName [mydbserver.domain.com]
[arw] PortNumber [1521]
[ar-] URL [jdbc:oracle:thin:@mydbserver.domain.com:1521/lnrac1]
 
[arw] DatabaseType [Oracle]
[arw] DriverVendor [Oracle]
[arw] DriverType [4]
[arw] IsXa [true]
[arw] IsOracleInstanceType [false]
[arw] IsRac [false]
[ar-] DriverClass [oracle.jdbc.xa.client.OracleXADataSource]

5.2.4.4 getJdbcURL

Returns the value of the URL attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.getJdbcURL(datasourceOrSchemaComponentName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema

Example

The following example returns the value of the URL attribute of the SOADatasource data source.

print OracleMWConfigUtilities.getJdbcURL('SOADatasource')
 
jdbc:oracle:thin:@mydbserver.domain.com:1521/lnrac1

5.2.4.5 getJdbcInstanceType

Returns the string Normal if the specified instance is a normal data source or returns Schema if the specified instance is a component schema.

Syntax

OracleMWConfigUtilities.getJdbcInstanceType(datasourceOrSchemaComponentName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema

Example

The following example indicates that SOADatasource is a normal JDBC data source.

print OracleMWConfigUtilities.getJdbcInstanceType('SOADatasource')
 
Normal

5.2.4.6 getJdbcDriverClass

Returns the value of the DriverClass attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.getJdbcDriverClass(datasourceOrSchemaComponentName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema

Example

The following example returns the value of the DriverClass attribute for the SOADatasource data source.

print OracleMWConfigUtilities.getJdbcDriverClass('SOADatasource')
 
oracle.jdbc.xa.client.OracleXADataSource

5.2.4.7 validateJdbc

Validates the configuration of the specified JDBC data source or component schema, and returns either None or an exception.

Syntax

OracleMWConfigUtilities.validateJdbc(datasourceOrSchemaComponentName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema

Examples

The following example validates the configuration of the SOADatasource data source, and indicates that there are no validation errors.

print OracleMWConfigUtilities.validateJdbc('SOADatasource')
 
None

The following example validates the configuration of the SOADatasource data source, and indicates that a required parameter (Host Name) was not specified for the data source.

print OracleMWConfigUtilities.validateJdbc('SOADatasource')
 
CFGFWK-68065:  JDBC datasource validation failed: SOADatasource: CFGFWK-68021:  The following must be specified:      Host Name

5.2.4.8 createDatasource

Creates a new data source using the specified attributes.

Syntax

OracleMWConfigUtilities.createDatasource(atts)

Argument Definition
atts A list of attributes. See the example for the list of attributes that you can set for a data source.

Example

The following example creates a data source named myNewDatasource with the specified attributes. In the example, datasourceCustomKey and datasourceCustomValue represents a custom name-value pair that may apply to the data source you are creating.

jdbcAtts = []
jdbcAtts.append(['Name','myNewDatasource'])
jdbcAtts.append(['Username','websphere'])
jdbcAtts.append(['Password','welcome1'])
jdbcAtts.append(['DatabaseType','Oracle'])
jdbcAtts.append(['DatabaseName','orcl'])
jdbcAtts.append(['ServerName','example.host.com'])
jdbcAtts.append(['PortNumber','1521'])
jdbcAtts.append(['IsXa','true'])
jdbcAtts.append(['StatementCacheSize','1024'])
jdbcAtts.append(['AgedTimeout','12345'])
jdbcAtts.append(['datasourceCustomKey','datasourceCustomValue'])
jdbcAtts.append(['JndiName','myJNDI'])
jdbcAtts.append(['Server','soa_server1'])
myNewDatasource = OracleMWConfigUtilities.createDatasource(jdbcAtts)

5.2.4.9 deleteDatasource

Deletes the specified data source or component schema.

Syntax

OracleMWConfigUtilities.deleteDatasource(datasourceOrSchmaComponentName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema

Example

OracleMWConfigUtilities.deleteDatasource('SOADatasource')

5.2.4.10 setJdbcUsername

Sets the value of the Username attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.setJdbcUsername(datasourceOrSchemaComponentName, username)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema
username The user name to use

Example

This example sets the Username attribute for the SOADatasource data source to websphere.

OracleMWConfigUtilities.setJdbcUsername('SOADatasource', 'websphere')

5.2.4.11 getJdbcUsername

Returns the value of the Username attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.getJdbcUsername(datasourceOrSchemaComponentName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema

Example

This example returns the value of the Username attribute for the SOADatasource data source.

print OracleMWConfigUtilities.getJdbcUsername('SOADatasource')

websphere

5.2.4.12 setJdbcPassword

Sets the value of the Password attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.setJdbcPassword(datasourceOrSchemaComponentName, password)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema
password The password to use

Example

This example sets the password for the SOADatasource to welcome1.

OracleMWConfigUtilities.setJdbcPassword('SOADatasource', 'welcome1')

5.2.4.13 setJdbcServerName

Sets the value of the ServerName attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.setJdbcServerName(datasourceOrSchemaComponentName, databaseServerName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema
databaseServerName The name of the database server

Example

This example sets the ServerName attribute for the SOADatasource data source to example.host.

OracleMWConfigUtilities.setJdbcServerName('SOADatasource', 'example.host')

5.2.4.14 getJdbcServerName

Returns the value of the ServerName attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.getJdbcServerName(datasourceOrSchemaComponentName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema

Example

This example returns the value of the ServerName attribute for the SOADataSource data source.

print OracleMWConfigUtilities.getJdbcServerName('SOADataSource')

myserver.domain.com

5.2.4.15 setJdbcPortNumber

Sets the value of the PortNumber attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.setJdbcPortNumber(datasourceOrSchemaComponentName, listenPort)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema
listenPort The listen port to use on the database server

Example

This example sets the PortNumber attribute for the SOADatasource data source to 1521.

OracleMWConfigUtilities.setJdbcPortNumber('SOADatasource', '1521')

5.2.4.16 getJdbcPortNumber

Returns the value of the PortNumber attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.getJdbcPortNumber(datasourceOrSchemaComponentName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema

Example

This example returns the value of the PortNumber attribute for the SOADataSource data source.

print OracleMWConfigUtilities.getJdbcPortNumber('SOADatasource')
 
1521

5.2.4.17 setJdbcDatabaseName

Sets the value of the DatabaseName attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.setJdbcDatabaseName(datasourceOrSchemaComponentName, databaseName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema
databaseName The name of the database

Example

This example sets the value of the DatabaseName attribute for the SOADataSource data source to orc1.

OracleMWConfigUtilities.setJdbcDatabaseName('SOADatasource', 'orcl')

5.2.4.18 getJdbcDatabaseName

Returns the value of the DatabaseName attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.getJdbcDatabaseName(datasourceOrSchemaComponentName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema

Example

This example returns the value of the DatabaseName attribute for the SOADatasource data source.

print OracleMWConfigUtilities.getJdbcDatabaseName('SOADatasource')
 
orc1

5.2.4.19 setJdbcDriverVendor

Sets the value of the DatabaseType attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.setJdbcDriverVendor(datasourceOrSchemaComponentName, databaseVendor)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema
databaseVendor The database vendor name

Example

This example sets the value of the DatabaseType attribute for the SOADatasource data source to Oracle.

OracleMWConfigUtilities.setJdbcDriverVendor('SOADatasource', 'Oracle')

5.2.4.20 getJdbcDriverVendor

Returns the value of the DatabaseType attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.getJdbcDriverVendor(datasourceOrSchemaComponentName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema

Example

This example returns the value of the DatabaseType attribute for the SOADatasource data source.

print OracleMWConfigUtilities.getJdbcDriverVendor('SOADatasource')
 
Oracle

5.2.4.21 setJdbcDriverXa

Sets the Boolean value of the IsXa attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.setJdbcDriverXa(datasourceOrSchemaComponentName, trueOrFalse)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema
trueOrFalse Set to true to indicate that the data source or component schema is XA. Set to false to indicate that the data source or component schema is non-XA.

Example

The following example sets the IsXa attribute for the SOADatasource data source to true.

OracleMWConfigUtilities.setJdbcDriverXa('SOADatasource', 'true')

5.2.4.22 getJdbcDriverXa

Returns the Boolean value of the IsXA attribute of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.getJdbcDriverXa(datasourceOrSchemaComponentName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema

Example

This example indicates that the SOADatasource data source is an XA data source.

print OracleMWConfigUtilities.getJdbcDriverXa('SOADatasource')
 
true

5.2.4.23 setJdbcIsOracleInstanceType

Sets the Oracle database URL to be an instance type (true) or a service type (false) for the specified data source or component schema.

Syntax

OracleMWConfigUtilities.setJdbcIsOracleInstanceType(datasourceOrSchemaComponentName, trueOrFalse)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema
trueOrFalse Set to true if the Oracle database URL is an instance type. Set to false if the Oracle database URL is a service type.

Example

OracleMWConfigUtilities.setJdbcIsOracleInstanceType('SOADatasource', 'false')

5.2.4.24 getJdbcIsOracleInstanceType

Returns the Boolean value of the IsOracleInstanceType attribute of the specified data source or component schema. See setJdbcIsOracleInstanceType for related information.

Syntax

OracleMWConfigUtilities.getJdbcIsOracleInstanceType(datasourceOrSchemaComponentName)

Argument Definition
datasourceOrSchemaComponentName The name of a data source or component schema

Example

The following example indicates that the IsOracleInstanceType attribute for the SOADatasource data source is set to false, and is therefore a service type.

print OracleMWConfigUtilities.getJdbcIsOracleInstanceType('SOADatasource')
 
false

5.2.5 JDBC Utility Functions for Oracle RAC

This section describes the JDBC utility functions that are related to Oracle RAC.

5.2.5.1 setJdbcRacHostsPorts

Sets the Oracle RAC database hosts and ports of the specified Oracle RAC data source or Oracle RAC component schema.

Syntax

OracleMWConfigUtilities.setJdbcRacHostsPorts(datasourceOrSchemaComponentName, hostPortsList)

Argument Definition
datasourceOrSchemaComponentName The name of the Oracle RAC data source or Oracle RAC component schema for which to set the hosts and ports
hostPortsList A list of hosts and ports in the format hostname:port, such as myhost:33, myhost2:33, myhost3:33

Example

The following example sets the Oracle RAC database hosts and ports for the SOADatasource data source to example.host1:1521 and example.host2:1521.

OracleMWConfigUtilities.setJdbcRacHostsPorts('SOADatasource',
['example.host1:1521', 'example.host2:1521'])

5.2.5.2 setJdbcRacServiceName

Sets the Oracle RAC database service name for the specified Oracle RAC data source or Oracle RAC component schema.

Syntax

OracleMWConfigUtilities.setJdbcRacServiceName(datasourceOrSchemaComponentName, racServiceName)

Argument Definition
datasourceOrSchemaComponentName The name of the Oracle RAC data source or Oracle RAC component schema for which to set the Service Name
racServiceName The Oracle RAC Service Name to use

Example

The following example sets the Oracle RAC database service name for the SOADatasource data source to orc1.

OracleMWConfigUtilities.setJdbcRacServiceName('SOADatasource', 'orcl')

5.2.5.3 getJdbcRacServiceName

Returns the Oracle RAC Service Name of the specified data source or component schema.

Syntax

OracleMWConfigUtilities.getJdbcRacServiceName(datasourceOrSchemaComponentName)

Argument Definition
datasourceOrSchemaComponentName The name of the Oracle RAC data source or Oracle RAC component schema from which to get the Service Name

Example

The following example returns the Oracle RAC service name for the SOADatasource data source.

OracleMWConfigUtilities.getJdbcRacServiceName('SOADatasource')

5.2.5.4 convertJdbcNormalDatasourceToRAC

Converts a normal data source or component schema to an Oracle RAC data source or schema with the specified data source name or component schema name, Oracle RAC service name, and a list of hosts and ports.

Syntax

OracleMWConfigUtilities.convertJdbcNormalDatasourceToRAC(datasourceName, RACserviceName, hostsPortsList)

Argument Definition
datasourceOrSchemaComponentName The data source or component schema name
RACserviceName The Oracle RAC service name
hostPortsList A list of hostname:port pairs

Example

The following example converts the myDatasource data source from a normal JDBC data source to an Oracle RAC data source, sets the Service Name to myRACService, and sets the Oracle RAC database hosts and ports to hostRac1.example.com:1521, hostRac2.example.com:1234, and hostRac3.example.com:4567.

hostsPorts = ['hostRac1.example.com:1521',
'hostRac2.example.com:1234', 'hostRac3.example.com:4567']
OracleMWConfigUtilities.convertJdbcNormalDatasourceToRAC('myDatasource',
'myRACService', hostsPorts)

5.2.5.5 convertJdbcRACToNormalDatasource

Converts an Oracle RAC data source to a normal data source or component schema with the specified data source name or component schema name, database type, isXA flag, and database host and port.

Syntax

OracleMWConfigUtilities.convertJdbcRACToNormalDatasource(datasourceName, databaseType, isXA, dbHost, dbPort)

Argument Definition
datasourceName The Oracle RAC data source name
databaseType The database type
isXA (Boolean) Set to true for XA; set to false for non-XA
dbHost The database host name or IP address
dbPort The database port

Example

The following example converts the myDatasource data source from an Oracle RAC data source to a normal JDBC data source, using the specified data source values.

OracleMWConfigUtilities.convertJdbcRACToNormalDatasource('myDatasource', 
'MSSQL Server', 'false', 'example.com', '1234')

5.2.6 File Store Utility Functions

This section describes the following utility functions for managing shared file stores.

Note:

You can use the following wsadmin command to display a list of service bus names:

OracleMWConfig.getChildren('SIBus')

5.2.6.1 setFileStoreDirectory

Sets the sharable file store directory for the specified cluster name and bus name combination.

Syntax

OracleMWConfigUtilities.setFileStoreDirectory(type,clusterName,busName,directory)

Argument Definition
type The type of directory, which can be LogDirectory, TemporaryStoreDirectory, or PermanentStoreDirectory
clusterName The name of the cluster
busName The name of the service bus
directory The location that you want to use for the specified directory type. You must specify an absolute path.

Example

The following examples sets the log directory for the sibus service bus on the cluster1 cluster.

OracleMWConfigUtilities.setFileStoreDirectory('LogDirectory','cluster1',
'sibus','${USER_INSTALL_ROOT}/log')

5.2.6.2 setLogDirectory

Sets the sharable log directory for the specified cluster name and bus name.

Syntax

OracleMWConfigUtilities.setLogDirectory(clusterName,busName,directory)

Argument Definition
clusterName The name of the cluster
busName The name of the bus
directory The location that you want to use for the log directory. You must specify an absolute path.

Example

The following example sets the log directory for the sibus service bus on the cluster1 cluster.

OracleMWConfigUtilities.setLogDirectory('cluster1','sibus'
'${USER_INSTALL_ROOT}/log')

5.2.6.3 setPermanentStoreDirectory

Sets the sharable permanent store directory for the specified cluster name and bus name.

Syntax

OracleMWConfigUtilities.setPermanentStoreDirectory(clusterName,busName,directory)

Argument Definition
clusterName The name of the cluster
busName The name of the bus
directory The location that you want to use for the permanent store directory. You must specify an absolute path.

Example

The following example sets the permanent store directory for the sibus service bus on the cluster1 cluster.

OracleMWConfigUtilities.setPermanentStoreDirectory('cluster1','sibus','${USER_INSTALL_ROOT}/log')

5.2.6.4 setTemporaryStoreDirectory

Sets the sharable temporary store directory for the specified cluster name and bus name.

Syntax

OracleMWConfigUtilities.setTemporaryStoreDirectory(clusterName,busName,directory)

Argument Definition
clusterName The name of the cluster
busName The name of the bus
directory The location that you want to use for the temporary store directory. You must specify an absolute path.

Example

The following example sets the temporary store directory for the sibus service bus on the cluster1 cluster.

OracleMWConfigUtilities.setTemporaryStoreDirectory('cluster1','sibus','${USER_INSTALL_ROOT}/log')

5.2.6.5 getFileStoreDirectory

Returns the sharable file store directory for a specified cluster name and bus name.

Syntax

OracleMWConfigUtilities.getFileStoreDirectory(type, clusterName,busName)

Argument Definition
type The type of directory to return
busName The name of the bus
clusterName The name of the cluster

Example

The following example returns the log directory for the sibus service bus on the cluster1 cluster.

OracleMWConfigUtilities.getFileStoreDirectory('LogDirectory',
'cluster1','sibus')
 
${USER_INSTALL_ROOT}/log

5.2.6.6 getLogDirectory

Returns the sharable log directory of the specified cluster name and bus name.

Syntax

OracleMWConfigUtilities.getLogDirectory(clusterName,busName)

Argument Definition
clusterName The name of the cluster
busName The name of the bus

Example

The following example returns the log directory for the sibus service bus on the cluster1 cluster.

OracleMWConfigUtilities.getLogDirectory('cluster1','sibus')

5.2.6.7 getPermanentStoreDirectory

Returns the sharable permanent store directory of the specified cluster name and bus name.

Syntax

OracleMWConfigUtilities.getPermanentStoreDirectory(clusterName,busName)

Argument Definition
clusterName The name of the cluster
busName The name of the bus

Example

The following example returns the permanent store directory for the sibus service bus on the cluster1 cluster.

OracleMWConfigUtilities.getPermanentStoreDirectory('cluster1','sibus')

5.2.6.8 getTemporaryStoreDirectory

Returns the sharable temporary store directory of the specified cluster name and bus name.

Syntax

OracleMWConfigUtilities.getTemporaryStoreDirectory(clusterName,busName)

Argument Definition
cluster The name of the cluster
busName The name of the bus

Example

The following example returns the temporary store directory for the sibus service bus on the cluster1 cluster.

OracleMWConfigUtilities.getTemporaryStoreDirectory('cluster1','sibus')