struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nitin M. Mandolkar" <>
Subject RE: Struts, running email process in separate thread
Date Thu, 23 Nov 2006 05:52:43 GMT
HI Levan 

I think the solution you are trying is good. But also look at this. 

What I will say. Don't create any thread from current action. Either put
a entry in database. Like need to send a e-mail for 

Write a daemon process using java or other language. This actually reads
these entries from database and sends the mail one by one. 

This approach has lots of advantages like 

1. You can log all email send to users. This is good for accounting
2. If you consider the scalability this approach is very good. 
3. Performance issues can be tackled here by putting some more servers
   Your domain. 
4. You can also re-try for the e-mail if the message is not sent. 

Nitin .

-----Original Message-----
From: Levan Dvalishvili [] 
Sent: Tuesday, November 21, 2006 8:33 AM
To: 'Struts Users Mailing List'
Subject: Struts, running email process in separate thread

Hi ! this might be little bit not directly related to Struts but since I
doing it in struts I decide to ask here, 
I have basic email procedure , what I try to achieve is :
1) from action to first start separate thread that will send email 
2) for current thread go the overview page saying your email will arrive

Both have to happen same time.

I could do it with regular thread procedures,  but I was wondering if
is like maybe a design pattern anyone wants to share that already has
identified bottle necks?
Best Regards.

Levan Dvalishvili

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message