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:
@@ -69,7 +69,7 @@ public abstract class AbstractContentReader extends AbstractContentAccessor impl
|
||||
|
||||
listeners = new ArrayList<ContentStreamListener>(2);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds the listener after checking that the output stream isn't already in
|
||||
* use.
|
||||
@@ -141,6 +141,19 @@ public abstract class AbstractContentReader extends AbstractContentAccessor impl
|
||||
}
|
||||
}
|
||||
|
||||
/** helper implementation for base class */
|
||||
protected boolean isChannelOpen()
|
||||
{
|
||||
if (channel != null)
|
||||
{
|
||||
return channel.isOpen();
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides low-level access to read content from the repository.
|
||||
* <p>
|
||||
@@ -204,6 +217,8 @@ public abstract class AbstractContentReader extends AbstractContentAccessor impl
|
||||
ReadableByteChannel directChannel = getDirectReadableChannel();
|
||||
channel = getCallbackReadableChannel(directChannel, listeners);
|
||||
|
||||
// notify that the channel was opened
|
||||
super.channelOpened();
|
||||
// done
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
|
Reference in New Issue
Block a user