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 |
Is the session factory thread safe?
When a thread terminates its processing, it enters into what state?
Why DOM Parser would take more Memory than SAX parser while they are parsing?
Can I have an action without a form?
What are the thread-to-thread communcation?
Is a class a subclass of itself?
What is deadlock?
What restrictions are placed on the location of a package statement within a source code file?
What are the different approaches to represent an inheritance hierarchy?
What are the steps to write p-to-p model application?
Why doesn’t the focus feature on the tag work in every circumstance?
Where we can write Rmi registry in the code, without having to write it at the command prompt?