client.evgen._raise(Events.DOCUMENT_FINALIZEAPPDATA, null, client, null);
boolean closeSession = isLastActiveClient(client);
if (closeSession) {
- log.debug("Raising request-to-save event");
- client.evgen._raise(Events.DOCUMENT_REQUESTTOCLOSE, null, client, null);
+ if (client.get_session().getUnsavedFlag())
+ {
+ log.debug("Raising request-to-save event");
+ client.evgen._raise(Events.DOCUMENT_REQUESTTOCLOSE, null, client, null);
+ }
+ log.debug("Raising session shutdown event");
client.evgen._raise(Events.SESSION_SHUTDOWN, null, client
.getSessionHandle(), null);
+ log.debug("All events raised for finalising session "+client.getSessionHandle().toString());
}
// cwe.haltWatch();
client.evgen.stopWatching();
// {//no client has registered as active
if (islastClient) {
// the client is the last one, so close current session
- log.info("last client removed: closing session");
+ log.info("FROMCLIENTLIST WATCHER: last client removed: closing session");
closeSession(client);
}
} else {