// this class implements its own factory
String factory = getClass().getName();
Reference ref = new Reference(getClass().getName(), factory, null);
ref.add(new StringRefAddr("description", getDescription()));
ref.add(new StringRefAddr("driver", getDriver()));
ref.add(new StringRefAddr("loginTimeout",
String.valueOf(getLoginTimeout())));
ref.add(new StringRefAddr("password", getPassword()));
ref.add(new StringRefAddr("user", getUser()));
ref.add(new StringRefAddr("url", getUrl()));
ref.add(new StringRefAddr("poolPreparedStatements",
String.valueOf(isPoolPreparedStatements())));
ref.add(new StringRefAddr("maxActive",
String.valueOf(getMaxActive())));
ref.add(new StringRefAddr("maxIdle",
String.valueOf(getMaxIdle())));
ref.add(new StringRefAddr("timeBetweenEvictionRunsMillis",
String.valueOf(getTimeBetweenEvictionRunsMillis())));
ref.add(new StringRefAddr("numTestsPerEvictionRun",
String.valueOf(getNumTestsPerEvictionRun())));
ref.add(new StringRefAddr("minEvictableIdleTimeMillis",
String.valueOf(getMinEvictableIdleTimeMillis())));
ref.add(new StringRefAddr("maxPreparedStatements",
String.valueOf(getMaxPreparedStatements())));
return ref;
}