Creating Datasource using WLST

connect(‘weblogic’,’weblogic’,’t3://localhost:7001′)
edit()
startEdit()
cd(‘/’)
cmo.createJDBCSystemResource(‘PegaRULES’)
cd(‘/JDBCSystemResources/PegaRULES/JDBCResource/PegaRULES’)
cmo.setName(‘PegaRULES’)
cd(‘/JDBCSystemResources/PegaRULES/JDBCResource/PegaRULES/JDBCDataSourceParams/PegaRULES’)
set(‘JNDINames’,jarray.array([String(‘jdbc/PegaRULES’)], String))
cd(‘/JDBCSystemResources/PegaRULES/JDBCResource/PegaRULES/JDBCDriverParams/PegaRULES’)
cmo.setUrl(‘jdbc:sqlserver://localhost:1433′)
cmo.setDriverName(‘com.microsoft.sqlserver.jdbc.SQLServerDriver’)
cmo.setPassword(‘pega612′)
cd(‘/JDBCSystemResources/PegaRULES/JDBCResource/PegaRULES/JDBCConnectionPoolParams/PegaRULES’)
cmo.setTestTableName(‘SQL SELECT 1\r\n\r\n’)
cd(‘/JDBCSystemResources/PegaRULES/JDBCResource/PegaRULES/JDBCDriverParams/PegaRULES/Properties/PegaRULES’)
cmo.createProperty(‘user’)
cd(‘/JDBCSystemResources/PegaRULES/JDBCResource/PegaRULES/JDBCDriverParams/PegaRULES/Properties/PegaRULES/Properties/user’)
cmo.setValue(‘pega612′)
cd(‘/JDBCSystemResources/PegaRULES/JDBCResource/PegaRULES/JDBCDriverParams/PegaRULES/Properties/PegaRULES’)
cmo.createProperty(‘databaseName’)
cd(‘/JDBCSystemResources/PegaRULES/JDBCResource/PegaRULES/JDBCDriverParams/PegaRULES/Properties/PegaRULES/Properties/databaseName’)
cmo.setValue(‘prpc612′)
cd(‘/JDBCSystemResources/PegaRULES/JDBCResource/PegaRULES/JDBCDataSourceParams/PegaRULES’)
cmo.setGlobalTransactionsProtocol(‘OnePhaseCommit’)
cd(‘/SystemResources/PegaRULES’)
set(‘Targets’,jarray.array([ObjectName(‘com.bea:Name=AdminServer,Type=Server’)], ObjectName))
activate()
dumpStack()
exit()

Latest Comments

  1. Administrator December 23, 2010
  2. Senthil Kumar October 1, 2012
    • Administrator November 4, 2012
  3. Ram August 14, 2013
    • anandraj August 26, 2013

Leave a Reply