Why use a datasource when you can directly specify a
connection details? (in a J2EE application)

Answer Posted / anand

Because, it would be really difficult to specify the connection details in every method that access the database. Instead, if we create a data source, it can be used to connect to the database in every method we want.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What event results from the clicking of a button?

698


What are the different approaches to represent an inheritance hierarchy?

588


how to use debug in my elipse to solve problems that exist in my project

1766


What is a class loader?

589


What class is used to create Server side object ?

1673






Define the remote object implementation?

2001


Why use POJO when I can use hashmap

2045


how to make a index.jsp for running the site in internet and find an error for connection with weblogic server and java that give an error invalid object name.and how to maintain session.

1755


Difference between DurableSubscription and non- DurableSubscription?

1716


Is the session factory thread safe?

677


Why use a datasource when you can directly specify a connection details?

534


Can we sent objects using Sockets?

649


Do I have to use jsps with my application?

583


whats is mean by tiles in struts

1622


What are the different types of exception?

572