• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • 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".
weblogic.jdbc.connectionPool.oraclePool=\
url=jdbc racle:thin:@myServer:1521 ata,\
driver=oracle.jdbc.driver.OracleDriver,\
initialCapacity=1,\
maxCapacity=2,\
capacityIncrement=1,\
props=user=SCOTT;password=TIGER
weblogic.jdbc.DataSource.oracleDataSource=oraclePool
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.
i.e.
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).
Regards,
M.S.Raman.
 
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.
reply
    Bookmark Topic Watch Topic
  • New Topic