• 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

DataSource.getConnection method

Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have created one Connection Pool for oracle database using thin driver. (Just for example,I am using DB user="SCOTT" and DBpassword="Tiger".
url=jdbc racle:thin:@myServer:1521 ata,\
In the context lookup i got the javax.sql.DataSource Object.
My Question is whether can i use the javax.sql.getConnection(String user,String pwd)
method to get the connection Object.
dataSourceObject= ctx.lookup("oracleDataSource");
Connection con= dataSourceObject.getConnection("SCOTT", "TIGER");
But it is throwing exception as method not implemented. Please help me to find out the solution so that i can hide the DB userid , DB password information in the weblogic.properties file and i can use it only in the runtime.
I am using weblogic 5.1 Application Server and oracle thin driver (classes12.zip).
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In recent versions of WLS, the database passwords are encrypted in the config.xml file (replaces function of weblogic.properties).
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic