This week's book giveaway is in the Functional programming forum.
We're giving away four copies of Functional Design and Architecture and have Alexander Granin on-line!
See this thread for details.
Win a copy of Functional Design and Architecture this week in the Functional programming forum!
  • 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Connection Pool

 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a created a Connection Pool Object in Weblogic5.1(say oraclePool for Oracle database).

The question is
1. How to access the connection pool object in the Java Servlet Program. Is it thro' Jndi Look up.In that case how to map the JNDI Name with the oraclePool(i.e. what will be the jndi name for the oraclePool, i have created in the weblogic server).
2. This Question is about the security of the database. If user knows the connection pool name , then he can get the full access control to the database. Then in that case how to secure the connection pool object. Whether we have to store the connection pool (jndi name?) in the properties file (new file to be created in the weblogic server).
Please help me.
Regards,
Raman
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. How to access the connection pool object in the Java Servlet Program. Is it thro' Jndi Look up.In that case how to map the JNDI Name with the oraclePool(i.e. what will be the jndi name for the oraclePool, i have created in the weblogic server).
---> Create a DataSource in Weblogic for your connection pool (Use the weblogic console for that). For doing a JNDI lookup and getting a connection...u can use the following lines..
Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("MyOracleDataSource");
connection = ds.getConnection();
(declare and initialize connection object in your program...)
2. This Question is about the security of the database. If user knows the connection pool name , then he can get the full access control to the database. Then in that case how to secure the connection pool object. Whether we have to store the connection pool (jndi name?) in the properties file (new file to be created in the weblogic server).
---> since you are using wl 5.1 u can authenticate by using some username/password stored in a property file in your weblogic server.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic