Hi All, Can anyone please tell me , what are the advantages of using a datasource over DriverManager to get a connection,not just with reference to pure java but also from a j2ee application point of view.
Joined: Oct 08, 2001
This is a JDBC question, and should be posted in the corresponding forum. Data source is an optional package in JDBC2.0, and offers many improvements over DriverManager.getConnection(). Most notably, connection pooling is part of it. Perhaps the best reason not to use DriverManager.getConnection() is because it has known problems, as documented in Sun's Bug Database. Under certain circumstances, the call to DriverManager.getConnection() results in a locked thread, and if you run in the multi-app server, all the other apps that use DriverManager will be doomed. [ October 27, 2003: Message edited by: Eugene Kononov ]
Joined: Oct 01, 2003
Thanks Eugene, It was useful information and it helped me understand the topic. Thanks again Bhupendra