File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database pooling with JNDI included

 
Abhay Raj
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friend…………i want to connect a database using datasource (pooling)…………..rather than using DriverManager.getConnection(url),

the database i m using is called dragon and username is root and password is ************
now the problem is , what should i provide in the following…….

cnt=new InitialContext();
cnt.bind(???, ds);
ds is DataSource instance…………..how do i connect…



how can i implement the URL in DataSource instance or how do we initiate it..........

Actually i want to create a class containing Connection and PrepareStament to implement the database connection...............................
please help....i m completely new to this concept.........
 
Wei Dai
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's easy, but you need to know what's your DataSource class.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic