mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Changed transaction handling in the main request processing loop to use the new method
that handles commit and rollback. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2309 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -23,8 +23,6 @@ import java.util.Enumeration;
|
|||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import javax.transaction.UserTransaction;
|
|
||||||
|
|
||||||
import org.alfresco.filesys.netbios.NetBIOSException;
|
import org.alfresco.filesys.netbios.NetBIOSException;
|
||||||
import org.alfresco.filesys.netbios.NetBIOSName;
|
import org.alfresco.filesys.netbios.NetBIOSName;
|
||||||
import org.alfresco.filesys.netbios.NetBIOSPacket;
|
import org.alfresco.filesys.netbios.NetBIOSPacket;
|
||||||
@@ -53,7 +51,6 @@ import org.alfresco.filesys.smb.server.notify.NotifyRequest;
|
|||||||
import org.alfresco.filesys.smb.server.notify.NotifyRequestList;
|
import org.alfresco.filesys.smb.server.notify.NotifyRequestList;
|
||||||
import org.alfresco.filesys.util.DataPacker;
|
import org.alfresco.filesys.util.DataPacker;
|
||||||
import org.alfresco.filesys.util.StringList;
|
import org.alfresco.filesys.util.StringList;
|
||||||
import org.alfresco.service.transaction.TransactionService;
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
@@ -1556,22 +1553,20 @@ public class SMBSrvSession extends SrvSession implements Runnable
|
|||||||
|
|
||||||
} // end switch session state
|
} // end switch session state
|
||||||
|
|
||||||
// Check for an active transaction, and commit it
|
// Commit, or rollback, any active user transaction
|
||||||
|
|
||||||
if ( hasUserTransaction())
|
try
|
||||||
{
|
{
|
||||||
try
|
// Commit or rollback the transaction
|
||||||
{
|
|
||||||
// Commit the transaction
|
|
||||||
|
|
||||||
UserTransaction trans = getUserTransaction();
|
endTransaction();
|
||||||
trans.commit();
|
}
|
||||||
}
|
catch ( Exception ex)
|
||||||
catch ( Exception ex)
|
{
|
||||||
{
|
// Debug
|
||||||
// Debug
|
|
||||||
logger.error("Error committing transaction", ex);
|
if ( logger.isDebugEnabled())
|
||||||
}
|
logger.debug("Error committing transaction", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Give up the CPU
|
// Give up the CPU
|
||||||
|
Reference in New Issue
Block a user