Recovery when marks fail to be stored in the database
There may be, from my experience, occasions when the connection to the database is lost from Tomcat: this, of course, could be just a local problem. This failure results in marks not being stored in the database.
To cover this and any other eventualities, every time a mark is obtained by a user, this is recorded in the activity log file, see . However, on a failure to write a mark into the database marks table, the details of the mark are stored in a log file in the logs file directory, see . On a coursework restart, (when the ApplicationListener is executed), this file is read and the marks stored in to the database. If this is successful, the marks log file is deleted.