CPD Results
The following document contains the results of PMD's CPD 7.0.0.
Duplications
File |
Line |
org/mybatis/guice/datasource/dbcp/PerUserPoolDataSourceProvider.java |
34 |
org/mybatis/guice/datasource/dbcp/SharedPoolDataSourceProvider.java |
31 |
private final PerUserPoolDataSource dataSource = new PerUserPoolDataSource();
@com.google.inject.Inject(optional = true)
public void setConnectionPoolDataSource(ConnectionPoolDataSource cpds) {
dataSource.setConnectionPoolDataSource(cpds);
}
@com.google.inject.Inject(optional = true)
public void setDataSourceName(@Named("DBCP.name") String name) {
dataSource.setDataSourceName(name);
}
@com.google.inject.Inject(optional = true)
public void setDefaultAutoCommit(@Named("JDBC.autoCommit") boolean autoCommit) {
dataSource.setDefaultAutoCommit(autoCommit);
}
@com.google.inject.Inject(optional = true)
public void setDefaultReadOnly(@Named("DBCP.defaultReadOnly") boolean defaultReadOnly) {
dataSource.setDefaultReadOnly(defaultReadOnly);
}
@com.google.inject.Inject(optional = true)
public void setDefaultTransactionIsolation(
@Named("DBCP.defaultTransactionIsolation") int defaultTransactionIsolation) {
dataSource.setDefaultTransactionIsolation(defaultTransactionIsolation);
}
@com.google.inject.Inject(optional = true)
public void setDescription(@Named("DBCP.description") String description) {
dataSource.setDescription(description);
}
@com.google.inject.Inject(optional = true)
public void setJndiEnvironment(@Named("DBCP.jndi.key") String key, @Named("DBCP.jndi.value") String value) {
dataSource.setJndiEnvironment(key, value);
}
@com.google.inject.Inject(optional = true)
public void setLoginTimeout(@Named("JDBC.loginTimeout") int loginTimeout) {
dataSource.setLoginTimeout(loginTimeout);
}
@com.google.inject.Inject(optional = true)
public void setDefaultMinEvictableIdleTimeMillis(
@Named("DBCP.defaultMinEvictableIdleTimeMillis") int defaultMinEvictableIdleTimeMillis) {
dataSource.setDefaultMinEvictableIdleTimeMillis(defaultMinEvictableIdleTimeMillis);
}
@com.google.inject.Inject(optional = true)
public void setDefaultNumTestsPerEvictionRun(
@Named("DBCP.defaultNumTestsPerEvictionRun") int defaultNumTestsPerEvictionRun) {
dataSource.setDefaultNumTestsPerEvictionRun(defaultNumTestsPerEvictionRun);
}
@com.google.inject.Inject(optional = true)
public void setRollbackAfterValidation(@Named("DBCP.rollbackAfterValidation") boolean rollbackAfterValidation) {
dataSource.setRollbackAfterValidation(rollbackAfterValidation);
}
@com.google.inject.Inject(optional = true)
public void setDefaultTestOnBorrow(@Named("DBCP.defaultTestOnBorrow") boolean defaultTestOnBorrow) {
dataSource.setDefaultTestOnBorrow(defaultTestOnBorrow);
}
@com.google.inject.Inject(optional = true)
public void setDefaultTestOnReturn(@Named("DBCP.defaultTestOnReturn") boolean defaultTestOnReturn) {
dataSource.setDefaultTestOnReturn(defaultTestOnReturn);
}
@com.google.inject.Inject(optional = true)
public void setDefaultTestWhileIdle(@Named("DBCP.defaultTestWhileIdle") boolean defaultTestWhileIdle) {
dataSource.setDefaultTestWhileIdle(defaultTestWhileIdle);
}
@com.google.inject.Inject(optional = true)
public void setDefaultTimeBetweenEvictionRunsMillis(
@Named("DBCP.defaultTimeBetweenEvictionRunsMillis") int defaultTimeBetweenEvictionRunsMillis) {
dataSource.setDefaultTimeBetweenEvictionRunsMillis(defaultTimeBetweenEvictionRunsMillis);
}
@com.google.inject.Inject(optional = true)
public void setValidationQuery(@Named("DBCP.validationQuery") String validationQuery) {
dataSource.setValidationQuery(validationQuery);
}
@com.google.inject.Inject(optional = true)
public void setDefaultMaxTotal(@Named("DBCP.defaultMaxTotal") int defaultMaxTotal) { |
File |
Line |
org/mybatis/guice/datasource/builtin/PooledDataSourceProvider.java |
51 |
org/mybatis/guice/datasource/dbcp/BasicDataSourceProvider.java |
54 |
dataSource = new PooledDataSource(driverClassLoader, driver, url, null, null);
}
/**
* Sets the user.
*
* @param username
* the new user
*
* @since 3.3
*/
@com.google.inject.Inject(optional = true)
public void setUser(@Named("JDBC.username") final String username) {
dataSource.setUsername(username);
}
/**
* Sets the password.
*
* @param password
* the new password
*
* @since 3.3
*/
@com.google.inject.Inject(optional = true)
public void setPassword(@Named("JDBC.password") final String password) {
dataSource.setPassword(password);
}
/**
* Sets the auto commit.
*
* @param autoCommit
* the new auto commit
*/
@com.google.inject.Inject(optional = true)
public void setAutoCommit(@Named("JDBC.autoCommit") final boolean autoCommit) {
dataSource.setDefaultAutoCommit(autoCommit);
}
/**
* Sets the login timeout.
*
* @param loginTimeout
* the new login timeout
*/
@com.google.inject.Inject(optional = true)
public void setLoginTimeout(@Named("JDBC.loginTimeout") final int loginTimeout) { |
File |
Line |
org/mybatis/guice/transactional/XASqlSessionManager.java |
228 |
org/mybatis/guice/transactional/XASqlSessionManager.java |
310 |
log.debug(id + ": call prepare old state=" + xlatedState() + ", XID=" + xid);
}
if (xid == null) {
throw new MyBatisXAException(id + ": XID cannot be null", XAException.XAER_INVAL);
}
if (state == NO_TX) {
throw new MyBatisXAException(id + ": resource never started on XID " + xid, XAException.XAER_PROTO);
} else if (state == STARTED) {
throw new MyBatisXAException(id + ": resource never ended on XID " + xid, XAException.XAER_PROTO);
} else if (state == ENDED) {
if (this.xid.equals(xid)) {
if (log.isDebugEnabled()) {
log.debug(id + ": OK to prepare, old state=" + xlatedState() + ", XID=" + xid); |