How to create JDBC connecin using Datasource ..?

Can any one explain.. when where why and the mos impoortant of all how to create JDBC connection using Datasource APIs.
[126 byte] By [Shebua] at [2007-11-27 9:59:14]
# 1

It depends on the running environment. I assume that you're running a webapplication using an applicationserver, like Glassfish or Tomcat.

1) Configure a DataSource in the administration console of the server and give it an JNDI name.

2) In the Javacode retrieve the DataSource from JNDI.

3) Retrieve the connection from it.

BalusCa at 2007-7-13 0:30:17 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...