A data source is a DataSource object that provides the connection information needed to connect to a database. The main advantage of using a data source is that it works with the Java Naming Directory Interface (JNDI) naming service, and it is created and managed apart from the applications that use it.