0

I am on websphere applciation server version 7.0.0.33. I need to update datasource J2EEResourceProperty validateNewConnectionTimeout (Validation by JDBC driver option) for some datasources for a cluster with the help of wsadmin. I understand, that to enable this option - 'validateNewConnectionTimeout' must be added as a custom property as a first step (if not already present). I am able to achieve this with the help of script however I am stuck at a point where this option is not getting selected. (yes I am enabling required option 'Validate existing pooled connections' before trying to enable). The problem is everytime the default option 'Validation by SQL query (deprecated in V7)' is getting enabled. How can I achieve this..? All help and suggestions are appreciated.

Here is the part of my script:

for dsName in dsList :
            dsId = dSources[ names.index( dsName ) ]
            cp = AdminConfig.showAttribute( dsId, 'connectionPool' )
            propertySet = AdminConfig.showAttribute(dsId,"propertySet")
            propertyList = AdminConfig.list("J2EEResourceProperty", propertySet).splitlines()
            found = 0
            for rp in propertyList:
                   if(AdminConfig.showAttribute(rp,"name") == "validateNewConnectionTimeout"):
                       AdminConfig.modify(rp, [ ['value', "15"]])
                       print "Property validateNewConnectionTimeout is updated"
                       found = 1
                       break
                    if found == 0:
                       AdminConfig.create('J2EEResourceProperty', propertySet, [['name', "validateNewConnectionTimeout"],['value', "30"]])
                       print 'Created new Property..!'

Thanks in advance

DeeSha
  • 1
  • 4

1 Answers1

0

Solved. had to reset another customer property in parallel. Thanks.

DeeSha
  • 1
  • 4