try
if (!_batchQueue.isEmpty())
    private void purgeBatchQueue() throws DataSinkException    {        try        {            _platform.insert(_connection, _model, _batchQueue);            if (!_connection.getAutoCommit())            {                _connection.commit();            }            if (_log.isDebugEnabled())            {                _log.debug("Inserted "+_batchQueue.size()+" beans in batch mode ");            }        }        catch (Exception ex)        {            if (_haltOnErrors)            {                _platform.returnConnection(_connection);                throw new DataSinkException(ex);            }            else            {                _log.warn("Exception while inserting "+_batchQueue.size()+" beans via batch mode into the database", ex);            }        }        _batchQueue.clear();    }