/** * Creates the test datasource converter. {@inheritDoc} * @throws Exception If anything goes wrong. */ @Override public void setUp() throws Exception { super.setUp(); dataSourceConverter = new DataSourceConverter(); }
/** * Parse properties and add any DataSources to pending configuration. DataSources will be found * if their property name starts with: {@link DatasourcePropertySet#DATASOURCE} */ protected void addDataSourcesFromProperties() { getLogger().debug("Searching properties for DataSource definitions", this.getClass().getName()); for (Map.Entry<String, String> property : getProperties().entrySet()) { String propertyName = property.getKey(); if (propertyName.startsWith(DatasourcePropertySet.DATASOURCE)) { String dataSourceProperty = property.getValue(); getLogger().debug( "Found DataSource definition: value [" + dataSourceProperty + "]", this.getClass().getName()); DataSource dataSource = new DataSourceConverter().fromPropertyString(dataSourceProperty); getDataSources().add(dataSource); } } }
/** * @return {@link DataSource} corresponding to this {@link DataSourceFixture}'s attributes. */ public DataSource buildDataSource() { return new DataSourceConverter().fromProperties(buildDataSourceProperties()); }
/** * @return String corresponding to this {@link DataSourceFixture}'s attributes. */ public String buildDataSourcePropertyString() { DataSourceConverter converter = new DataSourceConverter(); return converter.toPropertyString(buildDataSource()); }
connectionPool.setAttribute("Properties", new DataSourceConverter() .getConnectionPropertiesAsASemicolonDelimitedString(ds)); Element dataSource = null;
connectionPool.setAttribute("Properties", new DataSourceConverter() .getConnectionPropertiesAsASemicolonDelimitedString(ds)); Element dataSource = null;