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



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

Answer / 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

More Advanced Java Interview Questions

is servlet,struts are threadsafe or not.please telme correct answer

1 Answers   Microsoft,


Explain Life cycle of Servlet Filter.

2 Answers   InfoBrain, ITC Infotech,


What is mdb and what is the special feature of that?

0 Answers  


Write a program to show synchronization?

0 Answers  


What is bean? Where can it be used?

0 Answers  






What is the purpose of the wait(), notify(), and notifyall() methods?

0 Answers  


What is the argument type of a programs main() method?

0 Answers  


What is checkpoint? How to create checkpoints in our java projects?

1 Answers   ABC,


how do you Handle Front End Application data against DB with example?

0 Answers   Campus Interaction, HCL,


What are the difference between RMI and CORBA?

0 Answers  


how to search the pertical objects in a Collections

3 Answers   iGate,


how we can implement interface in jsp ?

2 Answers   Google,


Categories