I want to use an object pool for managing SMTP server connections, since they are very expensive to create (takes half of the total time of sending an email). So far I found the only options to be:
- Use Apache Commons Pool or some other 3rd party library
- Write it myself (risky!)
Doesn't the JDK provide an object pool? I rather not depend on a 3rd party and this seems like a pretty generic/basic feature to me.