Possible Duplicate:
Is java.sql.Connection thread safe?
I have gone through some tutorials.
They said to close the database connection through finally block.
But I have a question on my mind:
Think about a scenario where two threads are actively reading on one connection and one thread finishes his work and closes the connection. So what happens to the other?
Is the second thread able to complete his task?
Please let me know if my question is not valid and please let me know the best solution.