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

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