Knute Snortum wrote:From the image it looks like the user would select Disconnect from a Windows context menu. Are you controlling that menu?
Knute Snortum wrote:This is one way to "capture an event" on a context menu item:
Knute Snortum wrote:So the OS is creating the context menu? And one of the options is to disconnect your client process? Wow. I don't know how to protect against that.
So when user is disconnected (by Disconnect user from Task Manager) the client session looses the actual GUI but the GUI thread keeps running on the server machine and consuming the lot of resources
, start a script or a wrapper java app that starts the JavaFX app .
I start my JavaFX application via Remote Desktop Services
Ron McLeod wrote:
or try adding a listener using Screen.getScreens() and see what changes it reports when the remote user disconnects.
I don't work with JavaFX but what seems to be happening is that you are just shutting down the connection to the Server machine with the Java app .
That doesn't shut down the app so it will continue to use resources.
start a script or a wrapper java app that starts the JavaFX app .
If it is a wrapper app , create a shutdown method that first shuts down the JavaFX app then shut's itself down .