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 1rnrn’)
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 comments
Comments are closed.
This post is in response to the query asked in Oracle Forums
http://forums.oracle.com/forums/thread.jspa?threadID=2149148&tstart=0
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.
Hi Senthu,
The same steps should work.
I am not aware of OBIEE.
Thanks,
Faisal
Hi,
I am new to wlst..In the scripting so many times mentioned cmo..what is meant by ‘cmo’
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.
https://weblogic-wonders.com/weblogic/2010/11/21/a-short-article-on-cmos-wlst-variables/
Regards,
Wonders Team