Implementing Runtime.addShutdownHook is not too complicated (some explanations 
here https://www.geeksforgeeks.org/jvm-shutdown-hook-java/). It is not an 
absolute guarantee as it depends how exactly the process is shutdown. 
Question is : what can we do during this hook (must not be too long as the 
system may shut the process down anyway after a timeout).
I can see some options like 
- save modifications (layers having a datasource but unsaved modification)
- save unsaved layers (layers without datasource)
- save project
Some could be checked by default. 
Any thought ?


---

** [bugs:#322] OJ stops without warnings on system shutdown**

**Status:** open
**Milestone:** 
**Created:** Fri May 24, 2013 08:44 PM UTC by Jukka Rahkonen
**Last Updated:** Fri May 24, 2013 08:44 PM UTC
**Owner:** nobody


Tested with version 1.6.1 release on Windows.
If there are layers with unsaved edits in OpenJUMP and user ask computer to 
shut down, OpenJUMP is closed without any warnings and unsaved edits are lost. 
For comparison, Kosmo GIS 3.0 is keeping the computer in such a state that 
operating system sends a message that Kosmo prevents the shutdown and asks if 
user wants to cancel or do a forced shutdown. 


---

Sent from sourceforge.net because jump-pilot-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/jump-pilot/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/jump-pilot/admin/bugs/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to