org.codehaus.cargo.container.configuration.entry.DataSource.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(106)

本文整理了Java中org.codehaus.cargo.container.configuration.entry.DataSource.<init>()方法的一些代码示例,展示了DataSource.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataSource.<init>()方法的具体详情如下:
包路径:org.codehaus.cargo.container.configuration.entry.DataSource
类名称:DataSource
方法名:<init>

DataSource.<init>介绍

[英]initializes connectionProperties to a new object.
[中]将connectionProperties初始化为新对象。

代码示例

代码示例来源:origin: codehaus-cargo/cargo

/**
   * Create the datasource object.
   * @return Cargo datasource object.
   */
  public DataSource createDataSource()
  {
    TransactionSupport tSupport = TransactionSupport.valueOf(transactionSupport);
    DataSource dataSource = new DataSource(jndiName, connectionType, tSupport, driverClass,
        url, username, password, id, connectionProperties);
    return dataSource;
  }
}

代码示例来源:origin: org.codehaus.cargo/cargo-ant

/**
   * Create the datasource object.
   * @return Cargo datasource object.
   */
  public DataSource createDataSource()
  {
    TransactionSupport tSupport = TransactionSupport.valueOf(transactionSupport);
    DataSource dataSource = new DataSource(jndiName, connectionType, tSupport, driverClass,
        url, username, password, id, connectionProperties);
    return dataSource;
  }
}

代码示例来源:origin: codehaus-cargo/cargo

/**
   * Create the datasource object.
   * @return Cargo resource object.
   */
  public org.codehaus.cargo.container.configuration.entry.DataSource createDataSource()
  {
    TransactionSupport tSupport = TransactionSupport.valueOf(transactionSupport);
    org.codehaus.cargo.container.configuration.entry.DataSource dataSource =
        new org.codehaus.cargo.container.configuration.entry.DataSource(
            jndiName, connectionType, tSupport, driverClass, url, username,
            password, id, connectionProperties);
    return dataSource;
  }
}

代码示例来源:origin: codehaus-cargo/cargo

/**
 * Construct a DataSource from a list of properties.
 * 
 * @param properties A list of properties representing this datasource
 * @return DataSource representing the properties
 * @see PropertyUtils#splitPropertiesOnPipe(String)
 */
public DataSource fromProperties(Properties properties)
{
  String jndiLocation = properties.getProperty(DatasourcePropertySet.JNDI_LOCATION);
  String connectionType = properties.getProperty(DatasourcePropertySet.CONNECTION_TYPE);
  TransactionSupport transactionSupport = TransactionSupport.valueOf(
      properties.getProperty(DatasourcePropertySet.TRANSACTION_SUPPORT));
  String driverClass = properties.getProperty(DatasourcePropertySet.DRIVER_CLASS);
  String url = properties.getProperty(DatasourcePropertySet.URL);
  String username = properties.getProperty(DatasourcePropertySet.USERNAME);
  String password = properties.getProperty(DatasourcePropertySet.PASSWORD);
  String id = properties.getProperty(DatasourcePropertySet.ID);
  String driverPropertiesAsASemicolonDelimitedString =
    properties.getProperty(DatasourcePropertySet.CONNECTION_PROPERTIES);
  Properties connectionProperties = getDriverPropertiesFromString(
      driverPropertiesAsASemicolonDelimitedString);
  DataSource data = new DataSource(jndiLocation, connectionType, transactionSupport,
      driverClass, url, username, password, id, connectionProperties);
  return data;
}

代码示例来源:origin: com.atlassian.cargo-test-runner/cargo-test-runner

private static DataSource getDataSource(Properties properties, String containerId)
{
  Properties serverProperties = getPropertiesForServer(properties, containerId);
  DataSource dataSource = new DataSource();
  dataSource.setJndiLocation(serverProperties.getProperty("cargo.datasource.jndi"));
  dataSource.setDriverClass(serverProperties.getProperty("cargo.datasource.driver"));
  dataSource.setUrl(serverProperties.getProperty("cargo.datasource.url"));
  dataSource.setUsername(serverProperties.getProperty("cargo.datasource.username"));
  dataSource.setPassword(serverProperties.getProperty("cargo.datasource.password"));
  return dataSource;
}

代码示例来源:origin: codehaus-cargo/cargo

DataSource dataSource = new DataSource("jdbc/__default", 
  firstDS.getConnectionType(), firstDS.getTransactionSupport(),
    firstDS.getDriverClass(), firstDS.getUrl(), firstDS.getUsername(),

代码示例来源:origin: org.codehaus.cargo/cargo-core-container-glassfish

DataSource dataSource = new DataSource("jdbc/__default", 
  firstDS.getConnectionType(), firstDS.getTransactionSupport(),
    firstDS.getDriverClass(), firstDS.getUrl(), firstDS.getUsername(),

相关文章