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()

5 Thoughts on “Creating Datasource using WLST

  1. Administrator on December 23, 2010 at 1:30 am said:

    This post is in response to the query asked in Oracle Forums

    http://forums.oracle.com/forums/thread.jspa?threadID=2149148&tstart=0

  2. Senthil Kumar on October 1, 2012 at 7:34 am said:

    Hi,

    I am new to OBIEE and trying to create JDBC DS using wlst but none of my efforts are succeed. Can you please provide step by step comments so i can alter your code with my settings.

    thanks in advance, looking for your update.

  3. Hi,
    I am new to wlst..In the scripting so many times mentioned cmo..what is meant by ‘cmo’

    • anandraj on August 26, 2013 at 1:47 am said:

      Hi Ramesh,

      CMO is the WLST in built variable. These are like our JAVA keywords having a dedicated meaning and functionality. CMO stands for Current Management Object. While programming in WLST we can use cmo to point the current MBean (object) instance you are navigating into. The cmo value is changed when we navigate to different hierarchy of MBeans under different MBean trees in WebLogic (except jndi tree).

      Please refer the below link for further information.

      http://weblogic-wonders.com/weblogic/2010/11/21/a-short-article-on-cmos-wlst-variables/

      Regards,
      Wonders Team

Leave a Reply

Post Navigation