Search in sources :

Example 1 with CxfAssembler

use of org.qi4j.library.cxf.CxfAssembler in project qi4j-sdk by Qi4j.

the class DividendsMain method main.

public static void main(String[] args) throws Exception {
    SingletonAssembler assembler = new SingletonAssembler() {

        public void assemble(ModuleAssembly module) throws AssemblyException {
            module.services(ProjectedDividendsService.class).instantiateOnStartup();
            module.values(DivStream.class, DivPoint.class);
            new CxfAssembler().assemble(module);
        }
    };
    final Application application = assembler.application();
    Runtime.getRuntime().addShutdownHook(new Thread() {

        @Override
        public void run() {
            try {
                application.passivate();
            } catch (Exception e) {
                System.err.println("Problem shutting down Qi4j");
                e.printStackTrace();
            }
        }
    });
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) SingletonAssembler(org.qi4j.bootstrap.SingletonAssembler) Application(org.qi4j.api.structure.Application) AssemblyException(org.qi4j.bootstrap.AssemblyException) CxfAssembler(org.qi4j.library.cxf.CxfAssembler)

Aggregations

Application (org.qi4j.api.structure.Application)1 AssemblyException (org.qi4j.bootstrap.AssemblyException)1 ModuleAssembly (org.qi4j.bootstrap.ModuleAssembly)1 SingletonAssembler (org.qi4j.bootstrap.SingletonAssembler)1 CxfAssembler (org.qi4j.library.cxf.CxfAssembler)1