Package org.qi4j.bootstrap

Examples of org.qi4j.bootstrap.ModuleAssembly.services()


        throws AssemblyException
    {
        ModuleAssembly bootstrapModule = bootstrapLayer.module( "BOOTSTRAP-Bootstrap" );

        // Load base data on startup
        bootstrapModule
            .services( BaseDataService.class )
            .visibleIn( application )
            .instantiateOnStartup();
    }
View Full Code Here


            .transients(
                ProcessHandlingEvent.class )
            .visibleIn( application );

        ModuleAssembly contextServiceModule = contextLayer.module( "CONTEXT-Service" );
        contextServiceModule
            .services(
                ParseHandlingEventData.class,
                RoutingService.class,
                RouteSpecificationFactoryService.class )
            .visibleIn( application );
View Full Code Here

    private void assembleInfrastructureLayer( LayerAssembly infrastructureLayer )
        throws AssemblyException
    {
        ModuleAssembly serializationModule = infrastructureLayer.module( "INFRASTRUCTURE-Serialization" );
        serializationModule
            .services( OrgJsonValueSerializationService.class )
            .taggedWith( ValueSerialization.Formats.JSON )
            .setMetaInfo( new Function<Application, Module>()
        {
            @Override
View Full Code Here

        indexingModule
            .objects(
                EntityStateSerializer.class,
                EntityTypeSerializer.class );

        indexingModule
            .services(
                MemoryRepositoryService.class,
                RdfIndexingEngineService.class )
            .visibleIn( application )
            .instantiateOnStartup();
View Full Code Here

    private void assembleInfrastructureLayer( LayerAssembly infrastructureLayer )
        throws AssemblyException
    {
        ModuleAssembly serializationModule = infrastructureLayer.module( "INFRASTRUCTURE-Serialization" );
        serializationModule
            .services( OrgJsonValueSerializationService.class )
            .taggedWith( ValueSerialization.Formats.JSON )
            .setMetaInfo( new Function<Application, Module>()
        {
            @Override
View Full Code Here

        throws AssemblyException
    {
        super.assemble( module );

        ModuleAssembly config = module.layer().module( "config" );
        config.services( FileConfigurationService.class ).visibleIn( Visibility.layer ).instantiateOnStartup();
        new EntityTestAssembler().assemble( config );

        new OrgJsonValueSerializationAssembler().assemble( module );
        new JdbmEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
    }
View Full Code Here

                            visibleIn( Visibility.module ).
                            withCircuitBreaker( DataSources.newDataSourceCircuitBreaker() ).
                            assemble( testModule );

                    // Set up Liquibase service that will create the tables
                    testModule.services( LiquibaseService.class ).identifiedBy( "liquibase1" ).instantiateOnStartup();
                    testModule.entities( LiquibaseConfiguration.class );
                    testModule.forMixin( LiquibaseConfiguration.class ).declareDefaults().enabled().set( true );
                    testModule.forMixin( LiquibaseConfiguration.class ).declareDefaults().changeLog().set( "changelog.xml" );
                }
View Full Code Here

                            visibleIn( Visibility.module ).
                            withCircuitBreaker( DataSources.newDataSourceCircuitBreaker() ).
                            assemble( testModule2 );

                    // Set up Liquibase service that will create the tables
                    testModule2.services( LiquibaseService.class ).identifiedBy( "liquibase2" ).instantiateOnStartup();
                    testModule2.entities( LiquibaseConfiguration.class );
                    testModule2.forMixin( LiquibaseConfiguration.class ).declareDefaults().enabled().set( true );
                    testModule2.forMixin( LiquibaseConfiguration.class ).declareDefaults().changeLog().set( "changelog.xml" );
                }
View Full Code Here

    public final void assemble( ApplicationAssembly applicationAssembly ) throws AssemblyException
    {
        LayerAssembly layerAssembly = applicationAssembly.layer( LAYER );
        ModuleAssembly moduleAssembly = layerAssembly.module( MODULE );
        moduleAssembly.services( CommentServiceComposite.class ).identifiedBy( COMMENT_SERVICE_ID );
        // inject Spring bean as a service
        moduleAssembly.importedServices( TextProcessingService.class ).setMetaInfo(
                this.applicationContext.getBean( TO_UPPERCASE_SERVICE_ID ) );
    }
View Full Code Here

                    .setMetaInfo( new ServiceName( "Foo" ) );
                module.services( StringService.class, LongService.class );
                module.objects( ServiceUser.class );

                ModuleAssembly module2 = module.layer().module( "Other module" );
                ServiceDeclaration service2Decl = module2.services( MyServiceComposite.class );
                service2Decl.identifiedBy( "Bar" ).setMetaInfo( new ServiceName( "Bar" ) ).visibleIn( layer );

                ServiceDeclaration service3Decl = module2.services( MyServiceComposite2.class );
                service3Decl.identifiedBy( "Boo" ).setMetaInfo( new ServiceName( "Boo" ) );
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.