boolean useChunking)
throws SQLException
{
boolean debugEnabled = _log.isDebugEnabled();
String eventQuery = null;
ChunkingType type = _chunkingType;
if ( ! useChunking || (! type.isChunkingEnabled()))
{
eventQuery = _eventQueriesBySource.get(source.getSourceId());
} else {
if ( type == ChunkingType.SCN_CHUNKING)
eventQuery = _eventChunkedScnQueriesBySource.get(source.getSourceId());
else
eventQuery = _eventChunkedTxnQueriesBySource.get(source.getSourceId());
}
if (debugEnabled) _log.debug("source[" + source.getEventView() + "]: " + eventQuery +
"; skipInfinityScn=" + source.isSkipInfinityScn() + " ; sinceScn=" + sinceScn);
PreparedStatement pStmt = conn.prepareStatement(eventQuery);
if ( ! useChunking || (!type.isChunkingEnabled()))
{
pStmt.setFetchSize(currentFetchSize);
pStmt.setLong(1, sinceScn);
if (! source.isSkipInfinityScn()) pStmt.setLong(2, sinceScn);
} else {