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);
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);