WAS8.5 change DS webSphereDefaultIsolationLevel

in DMGR bin dir:
for i in cat tt; do ./wsadmin.sh -lang jython -f ds.py $i;done

tt:
Web1_CL
Web2_CL
Web3_CL

cluster = sys.argv[0]
ds =  AdminConfig.getid('/ServerCluster:'+cluster+'/JDBCProvider:DB2 Universal JDBC Driver Provider/DataSource:webDataSource')
propSet = AdminConfig.showAttribute( ds, 'propertySet' )
resProps = AdminConfig.showAttribute( propSet, 'resourceProperties' )
rsPropList = resProps[ 1:-1 ].split()
for prop in rsPropList :
    if ( prop.find( 'webSphereDefaultIsolationLevel' ) > -1 ) :
      urlValue = AdminConfig.showall( prop, 'value' )
      url_attr = [ [ 'name', 'webSphereDefaultIsolationLevel'  ], [ 'value', 2 ], [ 'type', 'java.lang.String' ], [ 'required', 'false' ] ]
      AdminConfig.modify( prop, url_attr )
      AdminConfig.save()

Leave a Reply

Your email address will not be published. Required fields are marked *