• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

update driver

 
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

can anything tell me whether i can simply update the driver by this? Thanks!
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is not recommended to manually register drivers, it is better to allow them to load themselves when the Class is loaded as happens with Class.forName()
The source for the DriverManager is available with the JDK, and if you have a look at it, it doesn't manage drivers well since manual loading can produce duplicate entries.
My answer is: maybe, but I'd have a look at the source to make sure. Normally I wouldn't recommend looking into the source code to solve a problem, but the behaviour is not specified in the API
 
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sold on the idea of using DataSource object methods to obtain Connections. I recommend checking out the oracle.jdbc.pool.OracleDataSource class to see if that isn't easier to deal with.
Instantiate a DataSource object and use its "setter" methods to specify driver type ("thin"?), database url, user, password, etc... then call getConnection().
 
reply
    Bookmark Topic Watch Topic
  • New Topic