mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added trace debugging categories to catch unclosed IO Channels and unclosed UserTransactions
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2382 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -155,6 +155,19 @@ public abstract class AbstractContentWriter extends AbstractContentAccessor impl
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/** helper implementation for base class */
|
||||
protected boolean isChannelOpen()
|
||||
{
|
||||
if (channel != null)
|
||||
{
|
||||
return channel.isOpen();
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides low-level access to write content to the repository.
|
||||
@@ -218,6 +231,8 @@ public abstract class AbstractContentWriter extends AbstractContentAccessor impl
|
||||
WritableByteChannel directChannel = getDirectWritableChannel();
|
||||
channel = getCallbackWritableChannel(directChannel, listeners);
|
||||
|
||||
// notify that the channel was opened
|
||||
super.channelOpened();
|
||||
// done
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
|
Reference in New Issue
Block a user