Search code examples
weblogicwlst

How to set multiple JNDI names in Weblogic wlst Offline


I want to add 2 jndi names to one data source.This is my code.

cd('/JDBCSystemResource/primelogDataSource/JdbcResource/primelogDataSource')
create('primelogDataSourceParams','JDBCDataSourceParams')
cd('JDBCDataSourceParams/NO_NAME_0')java.lang.String('abcDataSource','cdaDataSource'))
set('GlobalTransactionsProtocol', java.lang.String('None'))

This won't work. But if i add only one jndi name like below, it is working.

cd('JDBCDataSourceParams/NO_NAME_0')java.lang.String('abcDataSource'))

I must mention that this is offline python script. I am looking for help.


Solution

  • At the top in weblogic you have a 'record' button. Take a session, click the record button, do your changes, click the record button again and it will write a script to the filesystem that does the actions you recorded