Databases Reference
In-Depth Information
There's more...
Creating the multi data source using WLST
1. Log in as a wls user to shell and start WLST:
[wls@prod01]$ $WL_HOME/common/bin/wlst.sh
2. Connect to the Administration Server using wlsadmin as the user, <pwd> as the
password, and t3://adminhost.domain.local:7001 as the server URL:
wls:/offline> connect("wlsadmin","<pwd>","t3://adminhost.domain.
local:7001")
3. Run the following WLST commands to create the first data source:
edit()
startEdit()
#create the ds-XA-rac01 data source
cmo.createJDBCSystemResource('ds-XA-rac01')
cd('/JDBCSystemResources/ds-XA-rac01/JDBCResource/ds-XA-rac01')
cmo.setName('ds-XA-rac01')
cd('/JDBCSystemResources/ds-XA-rac01/JDBCResource/ds-XA-rac01/
JDBCDataSourceParams/ds-XA-rac01')
set('JNDINames',jarray.array([String('jdbc/ds-XA-rac01')],
String))
cd('/JDBCSystemResources/ds-XA-rac01/JDBCResource/ds-XA-rac01/
JDBCDriverParams/ds-XA-rac01')
cmo.setUrl('jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_
LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dbhost-rac01)(PORT=1521)))
(CONNECT_DATA=(SERVICE_NAME=dbservice-rac01)(INSTANCE_
NAME=instance-rac01)))')
cmo.setDriverName('oracle.jdbc.xa.client.OracleXADataSource')
cmo.setPassword('dbpwd');
cd('/JDBCSystemResources/ds-XA-rac01/JDBCResource/ds-XA-rac01/
JDBCConnectionPoolParams/ds-XA-rac01')
cmo.setTestTableName('SQL SELECT 1 FROM DUAL\r\n')
cd('/JDBCSystemResources/ds-XA-rac01/JDBCResource/ds-XA-rac01/
JDBCDriverParams/ds-XA-rac01/Properties/ds-XA-rac01')
cmo.createProperty('user')
cd('/JDBCSystemResources/ds-XA-rac01/JDBCResource/ds-XA-rac01/
JDBCDriverParams/ds-XA-rac01/Properties/ds-XA-rac01/Properties/
user')
 
Search WWH ::




Custom Search