Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP 3.0 Shutdown Problems
RAP 3.0 Shutdown Problems [message #1705376] Fri, 14 August 2015 09:58 Go to next message
Michael  Froeschen is currently offline Michael FroeschenFriend
Messages: 5
Registered: August 2015
Junior Member
Since the update to RAP 3.0 we have issues with the shutdown process.

If a UISession is active during shutdown, rap blocks the shutdown process till the session times out.
It also does not help to close the browsertab if the shutdown is already invoked, because the request that is send never reaches the rap-server.
First i checked if a UIThreadTerminatedError is thrown, but that is not the case until the session times out.

Any Ideas what might cause this or what i can do to find out what is causing this?
Re: RAP 3.0 Shutdown Problems [message #1705380 is a reply to message #1705376] Fri, 14 August 2015 12:03 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Michael,
do you have a reproducible scenario with our Workbench Demo. I don't
understand what do you mean by "If a UISession is active during
shutdown, rap blocks the shutdown process till the session times out.".
You are shutting down the servlet container?
Regards,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP 3.0 Shutdown Problems [message #1705384 is a reply to message #1705380] Fri, 14 August 2015 13:01 Go to previous messageGo to next message
Michael  Froeschen is currently offline Michael FroeschenFriend
Messages: 5
Registered: August 2015
Junior Member
Yes we are shutting down the Application Server (Wildfly in this case).
That works fine if the RAP Client has never been opened by anyone or if everyone has closed his browsertab before the shutdown.
But it "hangs" when someone still has his tab open (that was what i meant with the active UISession)
The UIThread is not stopped in that case and blocks till the Session timeout (defined in the web.xml of the war) is reached.


The following exception is thrown when the timeout is reached and the shutdown continues:

14:58:49,226 ERROR [stderr] (UIThread [b0e25f6]) Exception in thread "UIThread [b0e25f6]" java.lang.NullPointerException
14:58:49,227 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.rap.ui.internal.preferences.SessionScope.getNode(SessionScope.java:68)
14:58:49,227 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.ui.preferences.ScopedPreferenceStoreCore.getStorePreferences(ScopedPreferenceStoreCore.java:225)
14:58:49,228 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.ui.preferences.ScopedPreferenceStoreCore.getPreferenceNodes(ScopedPreferenceStoreCore.java:267)
14:58:49,229 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.ui.preferences.ScopedPreferenceStoreCore.internalGet(ScopedPreferenceStoreCore.java:458)
14:58:49,230 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.ui.preferences.ScopedPreferenceStoreCore.getBoolean(ScopedPreferenceStoreCore.java:370)
14:58:49,230 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.ui.preferences.ScopedPreferenceStore.getBoolean(ScopedPreferenceStore.java:447)
14:58:49,231 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:1097)
14:58:49,231 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.ui.internal.Workbench.access$12(Workbench.java:1071)
14:58:49,232 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.ui.internal.Workbench$21.run(Workbench.java:1337)
14:58:49,233 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.swt.custom.BusyIndicator.showWhile(Unknown Source)
14:58:49,233 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.ui.internal.Workbench.close(Workbench.java:1335)
14:58:49,233 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.ui.internal.Workbench.close(Workbench.java:1297)
14:58:49,234 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.ui.internal.Workbench$ShutdownHandler.handleEvent(Workbench.java:387)
14:58:49,234 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
14:58:49,235 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
14:58:49,235 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.swt.widgets.Display.sendDisposeEvent(Unknown Source)
14:58:49,236 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.swt.widgets.Display.release(Unknown Source)
14:58:49,236 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.swt.graphics.Device.dispose(Unknown Source)
14:58:49,237 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.rap.rwt.internal.lifecycle.UIThread.processShutdown(UIThread.java:176)
14:58:49,237 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.rap.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(Unknown Source)
14:58:49,238 ERROR [stderr] (UIThread [b0e25f6]) at java.lang.Thread.run(Thread.java:745)
14:58:49,238 ERROR [stderr] (UIThread [b0e25f6]) at org.eclipse.rap.rwt.internal.lifecycle.UIThread.run(UIThread.java:111)

Quote:

do you have a reproducible scenario with our Workbench Demo


I will try to reproduce this with the workbench demo
Re: RAP 3.0 Shutdown Problems [message #1705388 is a reply to message #1705384] Fri, 14 August 2015 13:35 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Michael,
do you have ServerPush activated (standing request without user
interaction)?
Regards,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP 3.0 Shutdown Problems [message #1705482 is a reply to message #1705388] Sun, 16 August 2015 19:34 Go to previous messageGo to next message
Michael  Froeschen is currently offline Michael FroeschenFriend
Messages: 5
Registered: August 2015
Junior Member
Hi,

According to the Network Monitor in Chrome a ServerPush request is pending.
Currently i do not know where we create that session.
I will investigate that.

Thanks so far
Re: RAP 3.0 Shutdown Problems [message #1705567 is a reply to message #1705482] Mon, 17 August 2015 14:28 Go to previous messageGo to next message
Michael  Froeschen is currently offline Michael FroeschenFriend
Messages: 5
Registered: August 2015
Junior Member
Looks like several Jobs are creating ServerPush Sessions.
We have Background Jobs scheduled at a fixed delay and those jobs seem to create a ServerPush Session, despite the fact that they are not running yet.

Is it intended that delayed jobs create a ServerPush Session?

In RAP 2.3 that was no problem. Can those ServerPush Sessions block the shutdown?
Re: RAP 3.0 Shutdown Problems [message #1705575 is a reply to message #1705567] Mon, 17 August 2015 15:08 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
standing ServerPush requests block some servlet containers from shutdown
(latest Jetty do so). Stop ServerPush when it's not needed anymore.
Regards,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP 3.0 Shutdown Problems [message #1705709 is a reply to message #1705575] Tue, 18 August 2015 13:16 Go to previous messageGo to next message
Michael  Froeschen is currently offline Michael FroeschenFriend
Messages: 5
Registered: August 2015
Junior Member
Correct me if i am wrong, but i think a job that is scheduled with a delay should not create a ServerPush, especially a system job, which should not be visible to the user.
The ServerPush should be created when needed and that would be the moment in which the Job changes its state to running.

The problem for us is, that our jobs have to run periodically. That is the reason why these jobs are (re)scheduled right after they finished.
I am not able to stop them at this moment because all mechanisms i know are not working. Both an ApplicationContextListener as well as an UISessionListener are not invoked till the timeout is reached. I do not know another way of getting notified that rap should be shutting down.

[Updated on: Tue, 18 August 2015 13:16]

Report message to a moderator

Re: RAP 3.0 Shutdown Problems [message #1705713 is a reply to message #1705709] Tue, 18 August 2015 13:31 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
could you provide a small code snippet for creation of such a job?
Regards,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:How to scroll text to bottom?
Next Topic:RAP with Workbench 3.x
Goto Forum:
  


Current Time: Fri Apr 26 01:40:06 GMT 2024

Powered by FUDForum. Page generated in 0.03756 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top