Reputation: 403
I am trying to send a mail to a large number of client with my XPages application, the application is supposed to create an save an email document then send out the mail to a specific mailing list.
but after sending 10 to 15mails the browser get a timeout and is end the process.
is there any workaround for this or is there any way to make it run on the server?
Upvotes: 0
Views: 93
Reputation: 21709
Stephan Wissel (stwissel) has given you the best answer. But until you have implemented that, you can use the following to increase the time until timeout:
<xp:scriptBlock id="scriptBlock1">
<xp:this.value><![CDATA[
XSP.addOnLoad(function(){
XSP.submitLatency = 1000*1000;
});
]]></xp:this.value>
</xp:scriptBlock>
XSP.submitLatency
is measured in milliseconds.
Upvotes: 1
Reputation: 20384
You need to decouple the browser response from the email sending process.
I would create a bean in an application context. Inside the bean a Java thread to run in the background for mail sending and return the browser in the front thread. If you want to keep the UI updated you could use a web socket connection.
Use this for more information: http://www.intec.co.uk/xots-background-and-multithreaded-tasks-the-openntf-domino-api-way-part-one/
Upvotes: 1