Answers

Question and Answer:

  Home  Advanced Java

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

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.

 174 views

More Questions for you: