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:
Derek Hulley
2006-02-15 13:05:25 +00:00
parent 80f8117602
commit 2f5a87fa9e
3 changed files with 93 additions and 10 deletions

View File

@@ -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())
{