Connection Pooling Problem in the HttpServlet, Need Help..... ASAP
hi all,
sample httpsevlet program is deployed and successfully executed.
but when i am using connection pooling that servlet is deployed but it is not displayed any output on the browser
who knows this connection pooling plz send the sample code for connection pool to create a table in the database........
thanks in advance..
Sree
hi
Using java Forums to maximum..
you just need to create a datasource object first
then call datasource.getConnection();
that will create u the connection
sample::::::::::::::::::::::::
try {
ctx= new InitialContext();
System.out.println("After Context");
ds=(DataSource)ctx.lookup(testProperties.getProperty("JNDINAME"));
try {
conn=(Connection)ds.getConnection();
System.out.println("The Connection"+conn);
return conn;
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println(testProperties.getProperty("propOne"));
}
catch (IOException e) {
}