How to design connection pool mechanism which is well suited in multithreaded environment

Questions by Gopikrishnaduggi

Showing Answers 1 - 6 of 6 Answers

sampra

  • Mar 11th, 2008
 

in the connection poolin mechanism instead creating conig connection one by one we can create create lot of connection by the help of container there is two paramentre required 1.initial no of connection
2.max no of connection

  Was this answer useful?  Yes

lhariPrasad

  • Mar 18th, 2008
 

Remember these points while designing the connection pool mechanisim.
1. Maintain a hash table of all the created connections
2. Assign a flag status for each connection whether it is in use or free
3. Once the connection usage is done, dont disconnect it instead return to the pool, I mean set the flag status as free / available
Program around these poins... lo a simple connection pooling ;-)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions