Register / Login
this forum made possible by our volunteer staff, including ...
Roel De Nijs
Stephan van Hulst
JDBC and Relational Databases
Getting Datasource from Context
posted 11 years ago
Getting Datasource from Context.
DataSource pool = (DataSource) env.lookup("jdbc/oracle-8i-athletes");
a) Place this code in init() of every
b) Place this code in a servlet that can be called along with application starting, then save the pool into application scope.
which solution is better?
It is sorta covered in the
JavaRanch Style Guide
Boost this thread!
Difference between getting Connection directly from the pool or from a DataSource
Closing The connection (Database)
Reading data from multiple tables. Any better way than this?
database connection in init() of servlet
Have Been Struggling for More Than a Week. Tomcat Connection Pool Configuration Prob