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

important features of java which differenciate it from c++

3 Answers  


Describe activation process?

0 Answers  


What is rmic?

4 Answers  


Why threads will block on I/O?

2 Answers  


Can constructors be synchronized in java?

0 Answers  






Which component handles cluster communication in jboss?

0 Answers  


What is Remote Interface?

1 Answers  


What are the thread-to-thread communcation?

1 Answers  


What is the initial state, When a thread is created and started?

3 Answers  


Can you give me a simple example of using the requiredif validator rule?

0 Answers  


Is 'synchronised' a modifier?

2 Answers   NIIT,


What is the need of serialize?

2 Answers   Wipro,


Categories