In an attempt to save all rooms when the server is shutdown I added the following code to the destroy() method of the extension:
Code: Select all
try {
trace("Saving rooms...");
getParentZone().getRoomPersistenceApi().saveAllRooms();
} catch (SFSStorageException e) {
trace("Error saving rooms:" + e);
}
This results in the static room we have (the room created by the admin console) getting saved, but all other rooms created at runtime are not saved. I'm assuming this is because the dynamically created rooms have already been destroyed.
Is there a place where the code above can be put to facilitate the saving of all the server's rooms at shutdown?
Thanks,
-Eric