Win a copy of Rust Web Development this week in the Other Languages 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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.
 
Paper jam tastes about as you would expect. Try some on 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