Posted By:
Anonymous
Posted On:
Monday, February 24, 2003 01:10 AM
Hi, everybody. In my web application, I create a ConnectionPoolDataSource object and I set the parameters of my database in its attributes. Then, I've made a static method that returns, each time it's called, a new handle (Connection), by calling the PooledConnection.getConnection() method. In my web application, I create a ConnectionPoolDataSource object and I set the parameters of my database in its attributes. Then, I've made a static method that returns, each time it's called, a new handle (Connection), by calling the PooledConnection.getConnection() method. Each time I need a connection, I call the getConnection() static method, I use the connection and the
More>>
Hi, everybody.
In my web application, I create a ConnectionPoolDataSource object and I set the parameters of my database in its attributes.
Then, I've made a static method that returns, each time it's called, a new handle (Connection), by calling the PooledConnection.getConnection() method.
In my web application, I create a ConnectionPoolDataSource object and I set the parameters of my database in its attributes.
Then, I've made a static method that returns, each time it's called, a new handle (Connection), by calling the PooledConnection.getConnection() method.
Each time I need a connection, I call the getConnection() static method, I use the connection and then I close it.
The question is very simple...
Which advantages would I get if I used the JNDI service, instead of defining the DataSource as I described?
Any kind of help will be very appreciated!!
<<Less