I have a requirement that the master thread in the server program creates POSIX worker threads dynamically upon the receipt of requests it receive. Each worker thread needs to do some Database Operation. For better performance we need to create a pool of Database connections at the time of server initialization and each worker thread requests for a DB connection from the pool. After the usage, the worker thread returns the DB connection back to the pool.
I would like to know the best algorithm being used for implementing Connection Pooling and synchronization. At any point in time DB connection is being used by only one thread.
I know Oracle supports Connection Pooling but unfortunately we are not using it.
Any help would be appreciated.