I have a class in which I once initialize a database Connection
private field. This object instantiation is final and will never change with an another connection. (e.x other database, other user, etc).
I want to execute different operations with this Connection
object through different method calls. These methods are called through out different threads for better performance.
I think that using a Connection Pool is useless due to the fact that I only use one Connection
. (Or, maybe I'm wrong). Should I use synchronization,
synchronized (mConnection) { }
or something else?
I'm sorry for any miss understanding in advance.