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
What is the difference between the session.get() method and the session.load() method?
whats is statement and procedure
What are the difference between RMI and CORBA?
What is the relationship between the canvas class and the graphics class?
What is threadfactory?
Which are the different segments of memory?
What if the static modifier is removed from the signature of the main method?
What is the form of storage space in java?
What is the purpose of the notify() method?
Explain what is synchronization?
difference between ejb,struts,hibernate,spring and jsp
What are the design considerations while making a choice between using interface and abstract class?
What is the difference between the string and stringbuffer classes?
What are the different algorithms used for clustering?
Define aop(assepct oriented programing)?