aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Connection Pool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Connection Pool " Watch "Connection Pool " New topic
Author

Connection Pool

Malli Raman
Ranch Hand

Joined: Nov 07, 2001
Posts: 312
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
Vishy Janardhan
Greenhorn

Joined: Jun 17, 2002
Posts: 7
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Pool