1

I have read this question: Database connection setup across all modules of a big java project. Basically, OP wants to know a good practice about how to retrieve database connections in a big project. The answer is: use a database connection pool. And in this other Q/A: How to establish a connection pool in JDBC? the most voted answer explains the usage of a connection pool and post examples, which will accurately answer OP's question. Should I vote to close the question as a duplicate even if the intent of the possible duplicate was different from the intention of the first OP?

2 Answers 2

1

When you close as duplicate, the question that the OP is asking needs to be the same as the original question. You're closing for duplicate questions, not duplicate answers.

If there is a more general form of the question that the OP is asking (i.e. a canonical/reference question), you can close the question as a duplicate of the more general form. Example:

I am getting a Null Reference Exception in this specific code. How do I fix it?

Can be closed as a duplicate of the more general question:

What is a NullReferenceException, and how do I fix it?

Try to be helpful. There's not much point in closing as duplicate if the original question has no useful answers. If the new question is unclear, incomplete or too broad, you can close on that basis if you can't find a suitable duplicate.

2

No.

If the intent of the question was different, the question is not identical to the one you want to close it as a duplicate of.

If the questions are similar in context, intention, etc, and they can both be answered by the same answer, it's safe to close'm as duplicate.

You can find a lot more info here, on the SO blog:
https://blog.stackoverflow.com/2009/04/handling-duplicate-questions/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .