}
private static CommonConnDef createConnDef(String jndiName, int minPoolSize, int maxPoolSize) throws ValidateException {
Integer minSize = (minPoolSize == -1) ? null : minPoolSize;
Integer maxSize = (maxPoolSize == -1) ? null : maxPoolSize;
CommonPoolImpl pool = new CommonPoolImpl(minSize, maxSize, false, false, FlushStrategy.FAILING_CONNECTION_ONLY);
CommonTimeOutImpl timeOut = new CommonTimeOutImpl(null, null, null, null, null);
CommonSecurityImpl security = null;
Recovery recovery = new Recovery(new CredentialImpl(null, null, null), null, Boolean.FALSE);
CommonValidationImpl validation = new CommonValidationImpl(null, null, false);
return new CommonConnDefImpl(Collections.<String, String>emptyMap(), RAMANAGED_CONN_FACTORY, jndiName, HQ_CONN_DEF, true, true, true, pool, timeOut, validation, security, recovery);