Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make the JavaMailSenderImpl class to use connection pooling to connect the SMTP server?

 
Suresh Vadivel
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using JavaMailSenderImpl send() method to send my MIMEMessage. Time taken to complete the send method is high and can be optimized as it is creating and closing connections everytime. Moreover need to keep this as synchronous call as there are further flows dependent on this. So planning to use pool of connections and make use of connections from the pool. Please advise how we can achieve this.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't recall ever hearing about connection pooling for SMTP connections. Is the time it takes to send mails an actual problem, or are you just assuming that it can be optimized and would like to do that?
 
Gaze Lee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm also looking forward a solution to solving this problem, here is another thread that I posted on springsource:

http://forum.springsource.org/showthread.php?133978-Batch-message-consuming-with-Spring-AMQP-amp-Spring-Mail

Can anyone help us please? Any advice greatly appreciated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic