On websphere applciation server version 184.108.40.206, 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 (if its deprecated why is it even there, legacy reason?). How can I achieve this..? All help and suggestions are appreciated.
Are you using a JDBC4 driver? According to IBM page here
Validation by JDBC driver
Specifies that the application server will use the JDBC driver to validate the connections. The JDBC provider must support JDBC 4.0 or greater to use this option.
Avoid trouble: For an Oracle datasource, Validation by JDBC Driver appears on the administrative console only after the validateNewConnectionTimeout property is added to the custom properties of the datasource. The validateNewConnectionTimeout property is used for JDBC 4.0 driver validation and can be specified using administrative console.
K. Tsang CEng MBCS PMP PMI-ACP OCPJEA OCPJP
posted 5 years ago
Thanks for your reply. Yes I had read that earlier it should JDBC4 driver, which is the case. However I feel good to inform that I have cracked it now. and it works as i wanted it to .. Thanks anyways. I had to reset the other preTestSQLString in parallel to get this in effect. Cheers.