Package org.qi4j.bootstrap

Examples of org.qi4j.bootstrap.SingletonAssembler.application()


        service.get().doStuff();

        assertTrue( isActive );

        assembly.application().passivate();

        assertFalse( isActive );
    }

    @Mixins( { MyServiceMixin.class } )
View Full Code Here


                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()
            {
View Full Code Here

        service.get();

        assertTrue( isActive );

        assembly.application().passivate();

        assertFalse( isActive );
    }

    public static interface ActivatableComposite
View Full Code Here

        {
            assertTrue( "Service should not be Active before accessed", !service.isActive() );
            assertTrue( service.get().data().activated );
            assertTrue( "Service should be Active after access.", service.isActive() );
        }
        assembly.application().passivate();
    }

    @Test
    public void givenMixedSuccessFailurePassivationWhenPassivatingExpectAllPassivateMethodsToBeCalled()
        throws Exception
View Full Code Here

            assertTrue( "Data should indicate that the service is activated", data.activated );
            assertTrue( "Service should be Active after access.", service.isActive() );
        }
        try
        {
            assembly.application().passivate();
            fail( "PassivationException should have been thrown." );
        }
        catch( PassivationException e )
        {
            // Expected
View Full Code Here

        {
            assertTrue( "Service should not be Active before accessed", !service.isActive() );
            assertTrue( service.get().data().activated );
            assertTrue( "Service should be Active after access.", service.isActive() );
        }
        assembly.application().passivate();
    }

    @Mixins(DataAccessMixin.class)
    public interface DataAccessService
        extends DataAccess, ServiceComposite
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.