Skip navigation.
Downloads | Product Documentation | Support

Managing WebLogic Platform Database Resources

# WebLogic Server Scripting Tool (WLST) Offline File

This appendix contains the WebLogic Server Scripting Tool (WLST) Offline file that you can use to configure a WebLogic Platform domain. For more information about this file and how to download it using a browser, see Configuring a WebLogic Platform Domain with WLST Offline. The file is listed in this appendix for the convenience of those who are unable to download it using a browser.

Listing A-1 WLST Offline File

>     #============================================================================
>     # Read Template

>     #============================================================================

>     print "opening template 'platform'"
>     readTemplate(r'c:/BEA_HOME/weblogic81/common/templates/domains/platform.jar')

>     #============================================================================
>     # Create JDBC Connection Pools and MultiPools

>     #============================================================================

>     #Create JDBCConnectionPool-cgPool1
>     print "creating cgPool1"
>     create('cgPool1','JDBCConnectionPool')
>     cd('JDBCConnectionPool/cgPool1')
>     cmo.setDriverName('oracle.jdbc.xa.client.OracleXADataSource')
>     cmo.setInitialCapacity(5)
>     set('KeepXAConnTillTxComplete','true')
>     cmo.setMaxCapacity(50)
>     cmo.setUserName('user_name')
>     cmo.setPassword('user_password')
>     set('CountOfTestFailuresTillFlush',1)
>     set('CountOfRefreshFailuresTillDisable',1)
>     set('RefreshMinutes',1)
>     set('ShrinkPeriodMinutes',15)
>     set('ShrinkingEnabled','true')
>     set('SupportsLocalTransaction','true')
>     set('Targets','cgServer')
>     set('TestConnectionsOnRelease','false')
>     set('TestConnectionsOnReserve', 'true')
>     cmo.setURL('jdbc:oracle:thin:@dbhost1:1521:dbname1')
>     set('XARetryDurationSeconds',300)
>     set('XASetTransactionTimeout','true')
>     set('TestConnectionsOnCreate', 'true')
>     set('XATransactionTimeout',302)

>     #Create JDBCConnectionPool-cgPool2
>     print "creating cgPool2"
>     cd ('/')
>     create('cgPool2','JDBCConnectionPool')
>     cd('JDBCConnectionPool/cgPool2')
>     cmo.setDriverName('oracle.jdbc.xa.client.OracleXADataSource')
>     cmo.setInitialCapacity(5)
>     set('KeepXAConnTillTxComplete','true')
>     cmo.setMaxCapacity(50)
>     cmo.setUserName('user_name')
>     cmo.setPassword('user_password')
>     set('CountOfTestFailuresTillFlush',1)
>     set('CountOfRefreshFailuresTillDisable',1)
>     set('RefreshMinutes',1)
>     set('ShrinkPeriodMinutes',15)
>     set('ShrinkingEnabled','true')
>     set('SupportsLocalTransaction','true')
>     set('Targets','cgServer')
>     set('TestConnectionsOnRelease','false')
>     set('TestConnectionsOnReserve', 'true')
>     cmo.setURL('jdbc:oracle:thin:@dbhost2:1521:dbname2')
>     set('XARetryDurationSeconds',300)
>     set('XASetTransactionTimeout','true')
>     set('TestConnectionsOnCreate', 'true')
>     set('XATransactionTimeout',302)

>     #Create JDBCConnectionPool-portalPool1
>     print "creating portalPool1"
>     cd ('/')
>     create('portalPool1','JDBCConnectionPool')
>     cd('JDBCConnectionPool/portalPool1')
>     cmo.setDriverName('oracle.jdbc.xa.client.OracleXADataSource')
>     cmo.setInitialCapacity(5)
>     set('KeepXAConnTillTxComplete','true')
>     cmo.setMaxCapacity(50)
>     cmo.setUserName('user_name')
>     cmo.setPassword('user_password')
>     set('CountOfTestFailuresTillFlush',1)
>     set('CountOfRefreshFailuresTillDisable',1)
>     set('RefreshMinutes',1)
>     set('ShrinkPeriodMinutes',15)
>     set('ShrinkingEnabled','true')
>     set('SupportsLocalTransaction','true')
>     set('Targets','cgServer')
>     set('TestConnectionsOnRelease','false')
>     set('TestConnectionsOnReserve', 'true')
>     cmo.setURL('jdbc:oracle:thin:@dbhost1:1521:dbname1')
>     set('XARetryDurationSeconds',300)
>     set('XASetTransactionTimeout','true')
>     set('TestConnectionsOnCreate', 'true')
>     set('XATransactionTimeout',302)

>     #Create JDBCConnectionPool-portalPool2
>     print "creating portalPool2"
>     cd ('/')
>     create('portalPool2','JDBCConnectionPool')
>     cd('JDBCConnectionPool/portalPool2')
>     cmo.setDriverName('oracle.jdbc.xa.client.OracleXADataSource')
>     cmo.setInitialCapacity(5)
>     set('KeepXAConnTillTxComplete','true')
>     cmo.setMaxCapacity(50)
>     cmo.setUserName('user_name')
>     cmo.setPassword('user_password')
>     set('CountOfTestFailuresTillFlush',1)
>     set('CountOfRefreshFailuresTillDisable',1)
>     set('RefreshMinutes',1)
>     set('ShrinkPeriodMinutes',15)
>     set('ShrinkingEnabled','true')
>     set('SupportsLocalTransaction','true')
>     set('Targets','cgServer')
>     set('TestConnectionsOnRelease','false')
>     set('TestConnectionsOnReserve', 'true')
>     cmo.setURL('jdbc:oracle:thin:@dbhost2:1521:dbname2')
>     set('XARetryDurationSeconds',300)
>     set('XASetTransactionTimeout','true')
>     set('TestConnectionsOnCreate', 'true')
>     set('XATransactionTimeout',302)

>     #Create JDBCConnectionPool-bpmArchPool1
>     print "creating bpmArchPool1"
>     cd ('/')
>     create('bpmArchPool1','JDBCConnectionPool')
>     cd('JDBCConnectionPool/bpmArchPool1')
>     cmo.setDriverName('oracle.jdbc.xa.client.OracleXADataSource')
>     cmo.setInitialCapacity(5)
>     set('KeepXAConnTillTxComplete','true')
>     cmo.setMaxCapacity(50)
>     cmo.setUserName('user_name')
>     cmo.setPassword('user_password')
>     set('CountOfTestFailuresTillFlush',1)
>     set('CountOfRefreshFailuresTillDisable',1)
>     set('RefreshMinutes',1)
>     set('ShrinkPeriodMinutes',15)
>     set('ShrinkingEnabled','true')
>     set('SupportsLocalTransaction','true')
>     set('Targets','cgServer')
>     set('TestConnectionsOnRelease','false')
>     set('TestConnectionsOnReserve', 'true')
>     cmo.setURL('jdbc:oracle:thin:@dbhost1:1521:dbname1')
>     set('XARetryDurationSeconds',300)
>     set('XASetTransactionTimeout','true')
>     set('TestConnectionsOnCreate', 'true')
>     set('XATransactionTimeout',302)

>     #Create JDBCConnectionPool-bpmArchPool2
>     print "creating bpmArchPool2"
>     cd ('/')
>     create('bpmArchPool2','JDBCConnectionPool')
>     cd('JDBCConnectionPool/bpmArchPool2')
>     cmo.setDriverName('oracle.jdbc.xa.client.OracleXADataSource')
>     cmo.setInitialCapacity(5)
>     set('KeepXAConnTillTxComplete','true')
>     cmo.setMaxCapacity(50)
>     cmo.setUserName('user_name')
>     cmo.setPassword('user_password')
>     set('CountOfTestFailuresTillFlush',1)
>     set('CountOfRefreshFailuresTillDisable',1)
>     set('RefreshMinutes',1)
>     set('ShrinkPeriodMinutes',15)
>     set('ShrinkingEnabled','true')
>     set('SupportsLocalTransaction','true')
>     set('Targets','cgServer')
>     set('TestConnectionsOnRelease','false')
>     set('TestConnectionsOnReserve', 'true')
>     cmo.setURL('jdbc:oracle:thin:@dbhost2:1521:dbname2')
>     set('XARetryDurationSeconds',300)
>     set('XASetTransactionTimeout','true')
>     set('TestConnectionsOnCreate', 'true')
>     set('XATransactionTimeout',302)

>     #Create JDBCMultiPool-cgMultiPool
>     print "creating cgMultiPool"
>     cd ('/')
>     create('cgMultiPool','JDBCMultiPool')
>     cd('JDBCMultiPool/cgMultiPool')
>     set('PoolList','cgPool1,cgPool2')
>     set('Targets','cgServer')
>     #The following attribute is valid only for high availability.
>     set('FailoverRequestIfBusy','true')
>     set('HealthCheckFrequencySeconds',300)

>     #===========================================================================
>     #  This MultiPool is configured for High Availability. To configure for
>     #  Load Balancing, comment out the following line and uncomment the line
>     #  after it.
>     #===========================================================================

>     set('AlgorithmType','High-Availability')
>     #set('AlgorithmType','Load-Balancing')

>     #Create JDBCMultiPool-portalMultiPool
>     print "creating portalMultiPool"
>     cd ('/')
>     create('portalMultiPool','JDBCMultiPool')
>     cd('JDBCMultiPool/portalMultiPool')
>     set('PoolList','portalPool1,portalPool2')
>     set('Targets','cgServer')
>     #The following attribute is valid only for high availability.
>     set('FailoverRequestIfBusy','true')
>     set('HealthCheckFrequencySeconds',300)

>     #===========================================================================
>     #  This MultiPool is configured for High Availability. To configure for
>     #  Load Balancing, comment out the following line and uncomment the line
>     #  after it.
>     #===========================================================================

>     set('AlgorithmType','High-Availability')
>     #set('AlgorithmType','Load-Balancing')

>     #Create JDBCMultiPool-bpmArchMultiPool
>     print "creating bpmArchMultiPool"
>     cd ('/')
>     create('bpmArchMultiPool','JDBCMultiPool')
>     cd('JDBCMultiPool/bpmArchMultiPool')
>     set('PoolList','bpmArchPool1,bpmArchPool2')
>     set('Targets','cgServer')
>     #The following attribute is valid only for high availability.
>     set('FailoverRequestIfBusy','true')
>     set('HealthCheckFrequencySeconds',300)

>     #============================================================================
>     # Modify Existing Datasources
>     #============================================================================
>     print "Modifying existing datasources"
>     cd('/')
>     cd('JDBCTxDataSources/portalFrameworkPool')
>     cmo.setPoolName('portalMultiPool')
>     set('Targets','cgServer')
>     cd('/')
>     cd('JDBCTxDataSources/bpmArchDataSource')
>     cmo.setPoolName('bpmArchMultiPool')
>     set('Targets','cgServer')

>     cd('/')
>     cd('JDBCTxDataSources/cgDataSource')
>     cmo.setPoolName('cgMultiPool')
>     set('Targets','cgServer')

>     #============================================================================
>     # Domain

>     #============================================================================

>     cd ('/')
>     cmo.setName('platformDomain_rac10')

>     #============================================================================
>     # User

>     #============================================================================
>     cd ('/')
>     cd('Security/platformDomain_rac10/User/weblogic')
>     cmo.setPassword('weblogic')

>     #============================================================================
>     # Administration Server

>     #============================================================================

>     cd('/')
>     cd('Server/cgServer')
>     cmo.setListenAddress('10.61.6.134')
>     cmo.setListenPort(9101)
>     cd('SSL/cgServer')
>     cmo.setEnabled(1)
>     cmo.setListenPort(9102)
>     cmo.setHostnameVerificationIgnored(1)

>     #============================================================================
>     # Create JDBC connection pools for Connect-Time Failover
>     #============================================================================
>     cd ('/')
>     cd ('JDBCConnectionPool')
>     nonXApools = 'cgJMSPool-nonXA',
>     for pool in nonXApools:
>       print "configuring non-XA pool '" + pool + "'"
>       cd (pool)
>       cmo.setDriverName('oracle.jdbc.OracleDriver')
>       cmo.setUserName('user_name')
>       cmo.setPassword('user_password')
>       cmo.setURL('jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=
>     (PROTOCOL=TCP)(HOST=dbhost1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=dbhost2)
>     (PORT=1521))(FAILOVER=on)(LOAD_BALANCE=off))(CONNECT_DATA=(SERVER=DEDICATED)
>     (SERVICE_NAME=dbservice)))')
>       cmo.setTestConnectionsOnReserve(1)
>       cmo.setCountOfTestFailuresTillFlush(1)
>       cmo.setTestTableName('dual')
>       cmo.setInitialCapacity(5)
>       cmo.setMaxCapacity(5)
>       cd ('..')

>     #============================================================================
>     # Options
>     #============================================================================
>     setOption('OverwriteDomain', 'true')
>     setOption('CreateStartMenu','false')
>     setOption('ServerStartMode','prod')
>     setOption('JavaHome',r'c:/BEA_HOME/jrockit81sp5_142_08')

>     #============================================================================
>     # Write Domain and Close Template
>     #============================================================================
>     writeDomain(r'c:/BEA_HOME/user_projects/domains/platformDomain_rac10')
>     closeTemplate()