public synchronized ResultSet process(Q target) throws Exception {

	long now = System.currentTimeMillis();
	Connection c = getConnection();
	if (c == null)
	    throw new AmbitException("no connection");

	ResultSet rs = null;
	try {
	    List<QueryParam> params = target.getParameters();
	    if (params == null) {
		statement = c.createStatement(getResultType(), getResultTypeConcurency());
		String sql = getSQL(target);

		rs = statement.executeQuery(sql);

	    } else {
		String sql = getSQL(target);
		sresults = getCachedStatement(sql);

		if (sresults == null) {
		    sresults = c.prepareStatement(sql, getResultType(), getResultTypeConcurency());
		    if (isCache())
			addStatementToCache(sql, sresults);
		} else {
		    sresults.clearParameters();
		}

		QueryExecutor.setParameters(sresults, params);
		logger.log(Level.FINE, sresults.toString());
		sresults.setFetchDirection(ResultSet.FETCH_FORWARD);
		sresults.setFetchSize(Integer.MIN_VALUE);
		rs = sresults.executeQuery();

	    }
	} catch (Exception x) {
	    try {
		System.err.println(x.getMessage() + " " + sresults);
	    } catch (Exception xx) {
	    }
	    throw new ProcessorException(this, x);
	} catch (Throwable x) {
	    throw new ProcessorException(this, x.getMessage());
	} finally {
	    // System.out.println(System.currentTimeMillis()-now + "\t"+
	    // (sresults==null?statement:sresults));
	}
	return rs;
    }