You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2018/06/10 16:08:15 UTC
commons-dbcp git commit: Javadoc and max line 120.
Repository: commons-dbcp
Updated Branches:
refs/heads/master acfc05224 -> 4f65842c5
Javadoc and max line 120.
Project: http://git-wip-us.apache.org/repos/asf/commons-dbcp/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-dbcp/commit/4f65842c
Tree: http://git-wip-us.apache.org/repos/asf/commons-dbcp/tree/4f65842c
Diff: http://git-wip-us.apache.org/repos/asf/commons-dbcp/diff/4f65842c
Branch: refs/heads/master
Commit: 4f65842c59170271f82f98b5eb3a985f198420a1
Parents: acfc052
Author: Gary Gregory <ga...@gmail.com>
Authored: Sun Jun 10 10:08:08 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Sun Jun 10 10:08:08 2018 -0600
----------------------------------------------------------------------
.../PoolableManagedConnectionFactory.java | 30 ++++++++++----------
1 file changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/4f65842c/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java
index df44893..69e1842 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java
@@ -43,22 +43,23 @@ public class PoolableManagedConnectionFactory extends PoolableConnectionFactory
private final TransactionRegistry transactionRegistry;
/**
- * Create a PoolableManagedConnectionFactory and attach it to a connection pool.
+ * Creates a PoolableManagedConnectionFactory and attach it to a connection pool.
*
- * @param connFactory XAConnectionFactory
+ * @param connFactory
+ * XAConnectionFactory
+ * @param dataSourceJmxName
+ * The data source name.
*/
- public PoolableManagedConnectionFactory(final XAConnectionFactory connFactory,
- final ObjectName dataSourceJmxName) {
+ public PoolableManagedConnectionFactory(final XAConnectionFactory connFactory, final ObjectName dataSourceJmxName) {
super(connFactory, dataSourceJmxName);
this.transactionRegistry = connFactory.getTransactionRegistry();
}
/**
- * Uses the configured XAConnectionFactory to create a {@link PoolableManagedConnection}.
- * Throws <code>IllegalStateException</code> if the connection factory returns null.
- * Also initializes the connection using configured initialization sql (if provided)
- * and sets up a prepared statement pool associated with the PoolableManagedConnection
- * if statement pooling is enabled.
+ * Uses the configured XAConnectionFactory to create a {@link PoolableManagedConnection}. Throws
+ * <code>IllegalStateException</code> if the connection factory returns null. Also initializes the connection using
+ * configured initialization SQL (if provided) and sets up a prepared statement pool associated with the
+ * PoolableManagedConnection if statement pooling is enabled.
*/
@Override
synchronized public PooledObject<PoolableConnection> makeObject() throws Exception {
@@ -86,14 +87,13 @@ public class PoolableManagedConnectionFactory extends PoolableConnectionFactory
} else {
config.setJmxEnabled(false);
}
- final KeyedObjectPool<PStmtKey,DelegatingPreparedStatement> stmtPool =
- new GenericKeyedObjectPool<>((PoolingConnection)conn, config);
- ((PoolingConnection)conn).setStatementPool(stmtPool);
+ final KeyedObjectPool<PStmtKey, DelegatingPreparedStatement> stmtPool = new GenericKeyedObjectPool<>(
+ (PoolingConnection) conn, config);
+ ((PoolingConnection) conn).setStatementPool(stmtPool);
((PoolingConnection) conn).setCacheState(getCacheState());
}
- final PoolableManagedConnection pmc =
- new PoolableManagedConnection(transactionRegistry, conn, getPool(),
- getDisconnectionSqlCodes(), isFastFailValidation());
+ final PoolableManagedConnection pmc = new PoolableManagedConnection(transactionRegistry, conn, getPool(),
+ getDisconnectionSqlCodes(), isFastFailValidation());
pmc.setCacheState(getCacheState());
return new DefaultPooledObject<PoolableConnection>(pmc);
}