Search in sources :

Example 1 with DerbySQLEntityStoreAssembler

use of org.qi4j.entitystore.sql.assembly.DerbySQLEntityStoreAssembler in project qi4j-sdk by Qi4j.

the class DerbySQLEntityStoreTest method assemble.

@Override
public // START SNIPPET: assembly
void assemble(ModuleAssembly module) throws AssemblyException {
    // END SNIPPET: assembly
    super.assemble(module);
    ModuleAssembly config = module.layer().module("config");
    new EntityTestAssembler().assemble(config);
    new OrgJsonValueSerializationAssembler().assemble(module);
    // START SNIPPET: assembly
    // DataSourceService
    new DBCPDataSourceServiceAssembler().identifiedBy("derby-datasource-service").visibleIn(Visibility.module).withConfig(config, Visibility.layer).assemble(module);
    // DataSource
    new DataSourceAssembler().withDataSourceServiceIdentity("derby-datasource-service").identifiedBy("derby-datasource").visibleIn(Visibility.module).withCircuitBreaker().assemble(module);
    // SQL EntityStore
    new DerbySQLEntityStoreAssembler().visibleIn(Visibility.application).withConfig(config, Visibility.layer).assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) DataSourceAssembler(org.qi4j.library.sql.assembly.DataSourceAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) DBCPDataSourceServiceAssembler(org.qi4j.library.sql.dbcp.DBCPDataSourceServiceAssembler) DerbySQLEntityStoreAssembler(org.qi4j.entitystore.sql.assembly.DerbySQLEntityStoreAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Example 2 with DerbySQLEntityStoreAssembler

use of org.qi4j.entitystore.sql.assembly.DerbySQLEntityStoreAssembler in project qi4j-sdk by Qi4j.

the class DerbySQLEntityStorePerformanceTest method createAssembler.

private static Assembler createAssembler() {
    return new Assembler() {

        @Override
        public void assemble(ModuleAssembly module) throws AssemblyException {
            ModuleAssembly config = module.layer().module("config");
            new EntityTestAssembler().assemble(config);
            new OrgJsonValueSerializationAssembler().assemble(module);
            // DataSourceService
            new DBCPDataSourceServiceAssembler().identifiedBy("derby-datasource-service").visibleIn(Visibility.module).withConfig(config, Visibility.layer).assemble(module);
            // DataSource
            new DataSourceAssembler().withDataSourceServiceIdentity("derby-datasource-service").identifiedBy("derby-datasource").withCircuitBreaker().assemble(module);
            // SQL EntityStore
            new DerbySQLEntityStoreAssembler().withConfig(config, Visibility.layer).assemble(module);
        }
    };
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) DataSourceAssembler(org.qi4j.library.sql.assembly.DataSourceAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) DBCPDataSourceServiceAssembler(org.qi4j.library.sql.dbcp.DBCPDataSourceServiceAssembler) DBCPDataSourceServiceAssembler(org.qi4j.library.sql.dbcp.DBCPDataSourceServiceAssembler) DerbySQLEntityStoreAssembler(org.qi4j.entitystore.sql.assembly.DerbySQLEntityStoreAssembler) Assembler(org.qi4j.bootstrap.Assembler) DataSourceAssembler(org.qi4j.library.sql.assembly.DataSourceAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler) DerbySQLEntityStoreAssembler(org.qi4j.entitystore.sql.assembly.DerbySQLEntityStoreAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Aggregations

ModuleAssembly (org.qi4j.bootstrap.ModuleAssembly)2 DerbySQLEntityStoreAssembler (org.qi4j.entitystore.sql.assembly.DerbySQLEntityStoreAssembler)2 DataSourceAssembler (org.qi4j.library.sql.assembly.DataSourceAssembler)2 DBCPDataSourceServiceAssembler (org.qi4j.library.sql.dbcp.DBCPDataSourceServiceAssembler)2 EntityTestAssembler (org.qi4j.test.EntityTestAssembler)2 OrgJsonValueSerializationAssembler (org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)2 Assembler (org.qi4j.bootstrap.Assembler)1