• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to use ConnectionPoolDataSource  RSS feed

 
Vijay Kumar
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi... all
I have written a code to get connection from databse using DataSource
but it is displaying null.... please tell me if I am doing something wrong..
my code is here....

InitialContext init=new InitialContext();
Context ctx=(Context)init.lookup("java:comp/env");
ConnectionPoolDataSource ds=(ConnectionPoolDataSource)ctx.lookup("jdbc/nokia.psireports");
con=ds.getPooledConnection();



Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!