Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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).
 
You'll never get away with this you overconfident blob! The most you will ever get is this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic