• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to Enable "Validation by JDBC driver" DataSource property via wsadmin

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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 (if its deprecated why is it even there, legacy reason?). How can I achieve this..? All help and suggestions are appreciated.

Here is the part of my script:

 
Bartender
Posts: 3648
16
Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

What database are you using?

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.

 
dee sharma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Tsang,

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.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic