From af933ac8bc37c590d901abdf8e84b0a22d33519b Mon Sep 17 00:00:00 2001 From: Gary Spencer Date: Thu, 23 Feb 2006 14:03:52 +0000 Subject: [PATCH] Cleanup active transactions for the CIFS session if it is abnormally terminated and there are open files. AR-452. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2480 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../filesys/smb/server/SMBSrvSession.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/java/org/alfresco/filesys/smb/server/SMBSrvSession.java b/source/java/org/alfresco/filesys/smb/server/SMBSrvSession.java index 0729d13d90..cf6761e017 100644 --- a/source/java/org/alfresco/filesys/smb/server/SMBSrvSession.java +++ b/source/java/org/alfresco/filesys/smb/server/SMBSrvSession.java @@ -436,6 +436,22 @@ public class SMBSrvSession extends SrvSession implements Runnable } } + // Commit, or rollback, any active user transaction + + try + { + // Commit or rollback the transaction + + endTransaction(); + } + catch ( Exception ex) + { + // Debug + + if ( logger.isDebugEnabled()) + logger.debug("Error committing transaction", ex); + } + // Check if there are active change notification requests if (m_notifyList != null && m_notifyList.numberOfRequests() > 0)