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

What are transaction attributes?

0 Answers  


Name the method to find, if a thread is active or not?

2 Answers  


What is RPC?

2 Answers  


What is in-memory replication?

0 Answers  


Which javutil classes and interfaces support event handling?

0 Answers  






What happens when a thread cannot acquire a lock on an object?

0 Answers  


What exceptions are thrown by RMI?

1 Answers  


what is the difference between System.out.println and out.println in java

10 Answers   CTS,


What is clustering? What are the different algorithms used for clustering?

0 Answers  


we use MainFrame and using os390 for operating system with DB2 data base in IRAN and interest programing with java and use webspere for world wide,please help me where i should start?

0 Answers   IBM,


can i call multipule form beans in Action class?

1 Answers   Wipro,


What is abstract schema?

0 Answers  


Categories