留言板

Sucess Response not coming at Front end

Pankaj Kumar,修改在7 年前。

Sucess Response not coming at Front end

Regular Member 帖子: 101 加入日期: 14-7-27 最近的帖子
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,修改在7 年前。

RE: Sucess Response not coming at Front end

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
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,修改在7 年前。

RE: Sucess Response not coming at Front end

Regular Member 帖子: 101 加入日期: 14-7-27 最近的帖子
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,修改在7 年前。

RE: Sucess Response not coming at Front end

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
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.