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 are the types of scaling?

791


Explain the advantages and disadvantages of detached objects.

783


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?

838


Which class is the immediate superclass of the menucomponent class?

895


What is a clone?

781


What do you know about seam?

777


Define aop(assepct oriented programing)?

893


What is TL and its use?

2204


What event results from the clicking of a button?

877


How to determine SGA site?

2154


What is local interface. How values will be passed?

760


What is the difference between a menuitem and a checkboxmenuitem?

757


Why do I get a duplicate name error when loading a jar file?

804


What are the services in RMI ?

2082


When a thread blocks on i/o?

774