Search

Useful Links

Friday, June 14, 2013

What is a DataSource and its Advantages ?



A DataSource object is the representation of a data source in the Java programming language. In basic terms,
  • A DataSource is a facility for storing data.
  • DataSource can be referenced by JNDI.
  • Data Source may point to RDBMS, file System , any DBMS etc..

What are the advantages of DataSource?
The few advantages of data source are :
  • An application does not need to hardcode driver information, as it does with the DriverManager.
  • The DataSource implementations can easily change the properties of data sources. For example: There is no need to modify the application code when making changes to the database details.
  • The DataSource facility allows developers to implement a DataSource class to take advantage of features like connection pooling and distributed transactions.

No comments:

Post a Comment