Connection pooling logic for generic use with any service