I have a question about the behavior of the following type of code
public synchronized < T > List< T > executeSelect(Class< T > c) { }
If I execute the code queryEngine.executeSelect(A.class); in one thread and queryEngine.executeSelect(B.class); in another thread do those threads treat the method as one (and one waits for another) or two different and they are executed concurrently?
I want to have a DB query engine that is behind a web service and returns object of a given type from a database. I also want to use just one connection to the database and open / close it for query execution.