use of org.qi4j.library.sql.assembly.ExternalDataSourceAssembler in project qi4j-sdk by Qi4j.
the class ExternalDataSourceTest method assemble.
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
BasicDataSource externalDataSource = new BasicDataSource();
externalDataSource.setDriverClassName("org.apache.derby.jdbc.EmbeddedDriver");
externalDataSource.setUrl("jdbc:derby:memory:testdbexternal;create=true");
// START SNIPPET: assembly
new ExternalDataSourceAssembler(externalDataSource).visibleIn(Visibility.module).identifiedBy("datasource-external-id").withCircuitBreaker(DataSources.newDataSourceCircuitBreaker()).assemble(module);
// END SNIPPET: assembly
}
Aggregations