Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

problem with sending email  RSS feed

 
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone , I want to send email and I can . But in my code Java is waiting for sending email and method does not finish till sending email . How can I insert db by doesn't depending on email . I write code as two process which doesn't depend on each other . This is my code ,I hope that , you can understand me ,  Thanks in advance .

 
Saloon Keeper
Posts: 4745
117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm assuming that you mean the emailService.sendMail method does not return immediately. The first approach to look into would be to have that method spin off the actual sending (which apparently blocks the code) into a separate thread.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!