isXA = Boolean.TRUE; } else { pool = new PoolImpl(minPoolSize < 0 ? Defaults.MIN_POOL_SIZE : minPoolSize, Defaults.INITIAL_POOL_SIZE, maxPoolSize < 0 ? Defaults.MAX_POOL_SIZE : maxPoolSize, Defaults.PREFILL, Defaults.USE_STRICT_MIN, Defaults.FLUSH_STRATEGY, null, Defaults.FAIR);
/** * {@inheritDoc} */ public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((interleaving == null) ? 0 : interleaving.hashCode()); result = prime * result + ((isSameRmOverride == null) ? 0 : isSameRmOverride.hashCode()); result = prime * result + ((noTxSeparatePool == null) ? 0 : noTxSeparatePool.hashCode()); result = prime * result + ((padXid == null) ? 0 : padXid.hashCode()); result = prime * result + ((wrapXaResource == null) ? 0 : wrapXaResource.hashCode()); return result; }
if (!(obj instanceof DsPoolImpl)) return false; if (!super.equals(obj)) return false;
/** * Constructor * * @param minPoolSize minPoolSize * @param initialPoolSize initialPoolSize * @param maxPoolSize maxPoolSize * @param prefill prefill * @param useStrictMin useStrictMin * @param flushStrategy flushStrategy * @param capacity capacity * @throws ValidateException ValidateException */ public PoolImpl(Integer minPoolSize, Integer initialPoolSize, Integer maxPoolSize, Boolean prefill, Boolean useStrictMin, FlushStrategy flushStrategy, Capacity capacity) throws ValidateException { this.minPoolSize = minPoolSize; this.initialPoolSize = initialPoolSize; this.maxPoolSize = maxPoolSize; this.prefill = prefill; this.useStrictMin = useStrictMin; this.flushStrategy = flushStrategy; this.capacity = capacity; this.validate(); }
/** * {@inheritDoc} */ public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((allowMultipleUsers == null) ? 0 : allowMultipleUsers.hashCode()); result = prime * result + ((connectionListener == null) ? 7 : 7 * connectionListener.hashCode()); return result; }
if (!super.equals(obj)) return false; if (!(obj instanceof XaPoolImpl))
pool = new XaPoolImpl(minPoolSize, initialPoolSize, maxPoolSize, prefill, useStrictMin, flushStrategy, capacity, fair, isSameRM, interlivng, padXid, wrapXaResource, noTxSeparatePool); } else { pool = new PoolImpl(minPoolSize, initialPoolSize, maxPoolSize, prefill, useStrictMin, flushStrategy, capacity, fair);
isXA = Boolean.TRUE; } else { pool = new PoolImpl(minPoolSize < 0 ? Defaults.MIN_POOL_SIZE : minPoolSize, Defaults.INITIAL_POOL_SIZE, maxPoolSize < 0 ? Defaults.MAX_POOL_SIZE : maxPoolSize, Defaults.PREFILL, Defaults.USE_STRICT_MIN, Defaults.FLUSH_STRATEGY, null, Defaults.FAIR);
private static ConnectionDefinition createConnDef(TransactionSupportEnum transactionSupport, String jndiName, int minPoolSize, int maxPoolSize, String managedConnectionPoolClassName, Boolean enlistmentTrace) throws ValidateException { Integer minSize = (minPoolSize == -1) ? null : minPoolSize; Integer maxSize = (maxPoolSize == -1) ? null : maxPoolSize; boolean prefill = false; boolean useStrictMin = false; FlushStrategy flushStrategy = FlushStrategy.FAILING_CONNECTION_ONLY; Boolean isXA = Boolean.FALSE; final Pool pool; if (transactionSupport == TransactionSupportEnum.XATransaction) { pool = new XaPoolImpl(minSize, Defaults.INITIAL_POOL_SIZE, maxSize, prefill, useStrictMin, flushStrategy, null, Defaults.FAIR, Defaults.IS_SAME_RM_OVERRIDE, Defaults.INTERLEAVING, Defaults.PAD_XID, Defaults.WRAP_XA_RESOURCE, Defaults.NO_TX_SEPARATE_POOL); isXA = Boolean.TRUE; } else { pool = new PoolImpl(minSize, Defaults.INITIAL_POOL_SIZE, maxSize, prefill, useStrictMin, flushStrategy, null, Defaults.FAIR); } TimeOut timeOut = new TimeOutImpl(null, null, null, null, null) { }; // <security> // <application /> // </security> // => PoolStrategy.POOL_BY_CRI Security security = new SecurityImpl(null, null, true, false); // register the XA Connection *without* recovery. ActiveMQ already takes care of the registration with the correct credentials // when its ResourceAdapter is started Recovery recovery = new Recovery(new CredentialImpl(null, null, null, false, null), null, Boolean.TRUE); Validation validation = new ValidationImpl(Defaults.VALIDATE_ON_MATCH, null, null, false); // do no track return new ConnectionDefinitionImpl(Collections.<String, String>emptyMap(), RAMANAGED_CONN_FACTORY, jndiName, ACTIVEMQ_CONN_DEF, true, true, true, Defaults.SHARABLE, Defaults.ENLISTMENT, Defaults.CONNECTABLE, false, managedConnectionPoolClassName, enlistmentTrace, pool, timeOut, validation, security, recovery, isXA); }
private static ConnectionDefinition createConnDef(TransactionSupportEnum transactionSupport, String jndiName, int minPoolSize, int maxPoolSize, String managedConnectionPoolClassName, Boolean enlistmentTrace) throws ValidateException { Integer minSize = (minPoolSize == -1) ? null : minPoolSize; Integer maxSize = (maxPoolSize == -1) ? null : maxPoolSize; boolean prefill = false; boolean useStrictMin = false; FlushStrategy flushStrategy = FlushStrategy.FAILING_CONNECTION_ONLY; Boolean isXA = Boolean.FALSE; final Pool pool; if (transactionSupport == TransactionSupportEnum.XATransaction) { pool = new XaPoolImpl(minSize, Defaults.INITIAL_POOL_SIZE, maxSize, prefill, useStrictMin, flushStrategy, null, Defaults.FAIR, Defaults.IS_SAME_RM_OVERRIDE, Defaults.INTERLEAVING, Defaults.PAD_XID, Defaults.WRAP_XA_RESOURCE, Defaults.NO_TX_SEPARATE_POOL); isXA = Boolean.TRUE; } else { pool = new PoolImpl(minSize, Defaults.INITIAL_POOL_SIZE, maxSize, prefill, useStrictMin, flushStrategy, null, Defaults.FAIR); } TimeOut timeOut = new TimeOutImpl(null, null, null, null, null) { }; // <security> // <application /> // </security> // => PoolStrategy.POOL_BY_CRI Security security = new SecurityImpl(null, null, true, false); // register the XA Connection *without* recovery. ActiveMQ already takes care of the registration with the correct credentials // when its ResourceAdapter is started Recovery recovery = new Recovery(new CredentialImpl(null, null, null, false, null), null, Boolean.TRUE); Validation validation = new ValidationImpl(Defaults.VALIDATE_ON_MATCH, null, null, false); // do no track return new ConnectionDefinitionImpl(Collections.<String, String>emptyMap(), RAMANAGED_CONN_FACTORY, jndiName, ACTIVEMQ_CONN_DEF, true, true, true, Defaults.SHARABLE, Defaults.ENLISTMENT, Defaults.CONNECTABLE, false, managedConnectionPoolClassName, enlistmentTrace, pool, timeOut, validation, security, recovery, isXA); }
private static ConnectionDefinition createConnDef(TransactionSupportEnum transactionSupport, String jndiName, int minPoolSize, int maxPoolSize, String managedConnectionPoolClassName, Boolean enlistmentTrace) throws ValidateException { Integer minSize = (minPoolSize == -1) ? null : minPoolSize; Integer maxSize = (maxPoolSize == -1) ? null : maxPoolSize; boolean prefill = false; boolean useStrictMin = false; FlushStrategy flushStrategy = FlushStrategy.FAILING_CONNECTION_ONLY; Boolean isXA = Boolean.FALSE; final Pool pool; if (transactionSupport == TransactionSupportEnum.XATransaction) { pool = new XaPoolImpl(minSize, Defaults.INITIAL_POOL_SIZE, maxSize, prefill, useStrictMin, flushStrategy, null, Defaults.FAIR, Defaults.IS_SAME_RM_OVERRIDE, Defaults.INTERLEAVING, Defaults.PAD_XID, Defaults.WRAP_XA_RESOURCE, Defaults.NO_TX_SEPARATE_POOL); isXA = Boolean.TRUE; } else { pool = new PoolImpl(minSize, Defaults.INITIAL_POOL_SIZE, maxSize, prefill, useStrictMin, flushStrategy, null, Defaults.FAIR); } TimeOut timeOut = new TimeOutImpl(null, null, null, null, null) { }; // <security> // <application /> // </security> // => PoolStrategy.POOL_BY_CRI Security security = new SecurityImpl(null, null, true, false); // register the XA Connection *without* recovery. ActiveMQ already takes care of the registration with the correct credentials // when its ResourceAdapter is started Recovery recovery = new Recovery(new CredentialImpl(null, null, null, false, null), null, Boolean.TRUE); Validation validation = new ValidationImpl(Defaults.VALIDATE_ON_MATCH, null, null, false); // do no track return new ConnectionDefinitionImpl(Collections.<String, String>emptyMap(), RAMANAGED_CONN_FACTORY, jndiName, ACTIVEMQ_CONN_DEF, true, true, true, Defaults.SHARABLE, Defaults.ENLISTMENT, Defaults.CONNECTABLE, false, managedConnectionPoolClassName, enlistmentTrace, pool, timeOut, validation, security, recovery, isXA); }
private static ConnectionDefinition createConnDef(TransactionSupportEnum transactionSupport, String jndiName, int minPoolSize, int maxPoolSize, String managedConnectionPoolClassName, Boolean enlistmentTrace) throws ValidateException { Integer minSize = (minPoolSize == -1) ? null : minPoolSize; Integer maxSize = (maxPoolSize == -1) ? null : maxPoolSize; boolean prefill = false; boolean useStrictMin = false; FlushStrategy flushStrategy = FlushStrategy.FAILING_CONNECTION_ONLY; Boolean isXA = Boolean.FALSE; final Pool pool; if (transactionSupport == TransactionSupportEnum.XATransaction) { pool = new XaPoolImpl(minSize, Defaults.INITIAL_POOL_SIZE, maxSize, prefill, useStrictMin, flushStrategy, null, Defaults.FAIR, Defaults.IS_SAME_RM_OVERRIDE, Defaults.INTERLEAVING, Defaults.PAD_XID, Defaults.WRAP_XA_RESOURCE, Defaults.NO_TX_SEPARATE_POOL); isXA = Boolean.TRUE; } else { pool = new PoolImpl(minSize, Defaults.INITIAL_POOL_SIZE, maxSize, prefill, useStrictMin, flushStrategy, null, Defaults.FAIR); } TimeOut timeOut = new TimeOutImpl(null, null, null, null, null) { }; // <security> // <application /> // </security> // => PoolStrategy.POOL_BY_CRI Security security = new SecurityImpl(null, null, true, false); // register the XA Connection *without* recovery. ActiveMQ already takes care of the registration with the correct credentials // when its ResourceAdapter is started Recovery recovery = new Recovery(new CredentialImpl(null, null, null, false, null), null, Boolean.TRUE); Validation validation = new ValidationImpl(Defaults.VALIDATE_ON_MATCH, null, null, false); // do no track return new ConnectionDefinitionImpl(Collections.<String, String>emptyMap(), RAMANAGED_CONN_FACTORY, jndiName, ACTIVEMQ_CONN_DEF, true, true, true, Defaults.SHARABLE, Defaults.ENLISTMENT, Defaults.CONNECTABLE, false, managedConnectionPoolClassName, enlistmentTrace, pool, timeOut, validation, security, recovery, isXA); }
if (DataSource.Tag.forName(reader.getLocalName()) == DataSource.Tag.POOL) return new PoolImpl(minPoolSize, initialPoolSize, maxPoolSize, prefill, useStrictMin, flushStrategy, capacity);
pool = new XaPoolImpl(minPoolSize, initialPoolSize, maxPoolSize, prefill, useStrictMin, flushStrategy, capacity, fair, isSameRM, interlivng, padXid, wrapXaResource, noTxSeparatePool); } else { pool = new PoolImpl(minPoolSize, initialPoolSize, maxPoolSize, prefill, useStrictMin, flushStrategy, capacity, fair);