Search code examples
javaconnectionclient-serverconnection-pooling

Connection Pooling for My Custom Application


In my Project i have a server application and a client application and one mediator application.Client communicates with the server through the mediator application.The mediator application inturn connects to the server application.

For Every client it needs to connect to the server application. I know that for every client request opening a new connection is expensive. I think i can make use of the connection pooling concept. How to implement this in java. Any pointers appreciated...

Thanks and Regards,

Sunny.


Solution

  • Use an object pooling api, such as Apache Commons Pool to implement your own pooling mechanism, or use an existing and feature rich caching solution such as Ehcache.