hi friends in the bellow code, i created a single Connection object by using Util() method and same will be given to my all
servlets and
jsp.
here my doubt is this connection object is single turn object for all my programs which means this connection object opens a one connection in a database and it sharable to all programs, so on database connection burden is reduced, then why i need to go connection pooling concept in
jdbc. please anybody can clear my confusion
Jdbc.java
import java.sql.Connection;
import java.sql.DriverManager;
public class Jdbc
{
private static Connection con;
public static Connection util()throws Exception
{
if(con==null)
{
Class.forName("oracle.jdbc.OracleDriver");
con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "system", "root");
}
return con;
}
}