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

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.
reply
    Bookmark Topic Watch Topic
  • New Topic