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

How would you create a button with rounded edges?

557


What is colon_pkg_prefixes and what is its use?

1997


What is difference between object state and behavior?

580


When a thread blocks on i/o?

563


What is the relation between the infobus and rmi?

556






what is meant by JRMP?

1809


What is the purpose of the notify() method?

596


Do you think that java should have had pointers?

596


What is a modular application? What does module-relative mean?

538


When a thread blocks on i/o, what state does it enter?

572


In our urls and in the text of the buttons we have comma. Its causing an error. Is there a way to change the delimiting character for the menu arguments?

578


Why are some of the class and element names counter-intuitive?

571


What is table mutation and how do you avoid it?

1915


What is bean? Where can it be used?

575


Explain ioc concept?

621