need JACL script help for websphere - Websphere
This is a discussion on need JACL script help for websphere - Websphere ; am able to run a script a created, the script does not give any errors but does not give any results as well.
I am trying to add name/value as a custom property for data sources
Below is the script. ...
-
need JACL script help for websphere
am able to run a script a created, the script does not give any errors but does not give any results as well.
I am trying to add name/value as a custom property for data sources
Below is the script. Please let me know if you need more information. Kindly review and let me know if i am missing something or i have done it wrong.
Thanks for your time. Please let me know if you need more information.
proc ds_custom_prop {} {
global AdminConfig
set cellid [$AdminConfig getid /Cell:/]
set cellName [$AdminConfig showAttribute $cellid name]
set nodeId [$AdminConfig getid /Cell:$cellName/Node:/]
set nodeName [$AdminConfig showAttribute $nodeId name]
set jdbcproviderid [$AdminConfig getid /Cell:$cellName/Node:$nodeName/JDBCProvider]
set jdbcprovidername [$AdminConfig showAttribute $jdbcproviderid name]
set datasourceid [$AdminConfig getid /Cell:$cellName/Node:$nodeName/JDBCProvider:$jdbcprovidername/DataSource]
set datasourcename [$AdminConfig showAttribute $datasourceid name]
set newds [$AdminConfig getid /Cell:$cellName/Node:$nodeName/JDBCProvider:$jdbcprovidername/DataSource:$datasourcename]
$AdminConfig required J2EEResourceProperty
set propSet [$AdminConfig showAttribute $newds propertySet]
set name[list name useRRASetEquals]
set value[list value true]
set rpAttrs[list $name $value]
$AdminConfig create J2EEResourceProperty $propSet $rpAttrs
$AdminConfig save
}
-
Re: need JACL script help for websphere
Regarding:
set propSet [$AdminConfig showAttribute $newds propertySet]
probably, its not there yet, so you cant query
try
#Set the properties for the data source.
set propSet [$AdminConfig create J2EEResourcePropertySet $ds1 {}
http://publib.boulder.ibm.com/infoce...scriptool.html