posted 11 years ago
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.........