Fórum

Sucess Response not coming at Front end

Pankaj Kumar, modificado 7 Anos atrás.

Sucess Response not coming at Front end

Regular Member Postagens: 101 Data de Entrada: 27/07/14 Postagens Recentes
Hi All[],

I have written migration script which runs on click of submit button.Migration script is taking 2 hours to finish the migration process.But problem is in two hours the session expires and after completion of migration the success messages does not come at front side.
Please tell me can we have any alternative way to get the successful message at Front side.Can we increase timeout of ajax request.

I am using Alloy for ajax request and my operating system is Linux.

Thanks & Regards,
Pankaj Semwal
thumbnail
David H Nebinger, modificado 7 Anos atrás.

RE: Sucess Response not coming at Front end

Liferay Legend Postagens: 14918 Data de Entrada: 02/09/06 Postagens Recentes
Often times this kind of thing is not handled "live". The user is tied up and cannot navigate away, a close of the browser can cause issues, etc.

If I had to do this kind of thing in the portal, I'd likely be sending a message to a receiving component, makes the processing of the message asynchronous in nature.

Upon completion, I'd likely leverage the notifications API to send a notification to the user. Will sit in the notification queue waiting for the user to log in and review it. In fact, you could send to a role or a group if you needed to notify more than just a single user or you want to ensure the process will continue to work even if the user leaves the organization.

But honestly I'd actually push back on this requirement. Any long running batch task running inside tomcat and inside the jvm is going to suck memory, cpu cycles and other resources away from the portal instance, away from the primary responsibility of servicing user requests.

Even if it had to be running within a portal context, I'd probably still lean towards running this in an isolated cluster node; one node would be out of the cluster (via load balancer config), not serving user requests but only servicing these kinds of batch tasks. This would leave the cluster up and running to service user requests.
Pankaj Kumar, modificado 7 Anos atrás.

RE: Sucess Response not coming at Front end

Regular Member Postagens: 101 Data de Entrada: 27/07/14 Postagens Recentes
Thanks David for your detail explanation.

Its means i need to use MessageBusUtil Utility for sending the Message.
Is there any document available or any example for MessageBusUtil as how to configure it.
Please let me know.
thumbnail
David H Nebinger, modificado 7 Anos atrás.

RE: Sucess Response not coming at Front end

Liferay Legend Postagens: 14918 Data de Entrada: 02/09/06 Postagens Recentes
you looking for like a complete reference on how to use the message bus?

In case you haven't looked there before, https://dev.liferay.com/ has all kinds of documentation on all kinds of things that you may not have looked for before.