• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

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).
 
girl power ... turns out to be about a hundred watts. But they seriuosly don't like being connected to the grid. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic