0

I am developing application using Primefaces and Java 8. Running application in WebSphere Liberty 19.0.0.4. I am setting Transaction timeout to 25 minutes and session timeout to 30 minutes.

When the Submit button is clicked, it's calling a stored procedure in the backend. It takes 20 minutes to complete the process. While submit button onclick the PF('waitDialog').show() will open to show 'Please wait' message.

Closing the dialog in oncomplete, but it is closed automatically after 15 minutes. I am also showing message 'Submitted successfully' after completing the process. It also not displaying after process complete. The bean is @ViewAccessScoped.

What is the reason for this issue.?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
user3410249
  • 161
  • 4
  • 14

1 Answers1

3

The real cause is most likely that the http connection is closed by e.g. a reverse proxy or a firewall or websphere-liberty. The ajax call is completed then (most likely with an error) executing the oncomplete. Doing something in the onsuccess or onerror will help investigating this. But the only real solution is to do things like this async and not keep an http connection open for so long.

See also:

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
  • How can I implement Onsuccess or onerror in primefaces. Primefaces commandbutton onsuccess not working. – user3410249 Oct 24 '19 at 14:07
  • onsuccess will **only** fire when the action completes without errors. But it is the wrong approach for solution. Go async... – Kukeltje Oct 24 '19 at 14:42
  • But how can I track exact issue. As you said I need to implement onsuccess or onerror in my code, How can Implement it to identify the issue. .? – user3410249 Oct 24 '19 at 15:58
  • When it **fails** the onerror....should be triggered. But the **real solution** is to do things async – Kukeltje Oct 24 '19 at 16:10
  • I Understand the real solution is do it in async. But I need to find exact error. So , Can I add onerror in primefaces command button to catch the error.? – user3410249 Oct 24 '19 at 16:22
  • 1
    According to my comments and the documentation you can. But the 'error' will be that the ajax failed. You can also check the browser developer network traffic to see the connection getting closed. All basic webdevelopment stuff. Nothing primefaces or jsf related – Kukeltje Oct 24 '19 at 17:31
  • Thank you @Kukeltje. Yes, It return Http 500 - Internal server error. – user3410249 Oct 25 '19 at 12:02