Package org.apache.deltaspike.cdise.api

Examples of org.apache.deltaspike.cdise.api.CdiContainer.boot()


        CdiContainer container = CdiContainerLoader.getCdiContainer();

        if (!containerStarted)
        {
            container.boot();
            containerStarted = true;
        }

        notifier.addListener(new LogRunListener());
View Full Code Here


    }

    public static void main(String[] args)
    {
        CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer();
        cdiContainer.boot();

        ContextControl contextControl = cdiContainer.getContextControl();
        contextControl.startContext(ApplicationScoped.class);

        SettingsBean settingsBean = BeanProvider.getContextualReference(SettingsBean.class, false);
View Full Code Here

    }

    public static void main(String[] args) throws InterruptedException
    {
        CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer();
        cdiContainer.boot();

        ContextControl contextControl = cdiContainer.getContextControl();
        contextControl.startContext(ApplicationScoped.class);

        GlobalResultHolder globalResultHolder =
View Full Code Here

     */
    public static void main(String[] args)
    {

        CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer();
        cdiContainer.boot();

        ContextControl contextControl = cdiContainer.getContextControl();
        contextControl.startContext(ApplicationScoped.class);
        //containerControl.startContexts();

View Full Code Here

    public void testContainerBoot()
    {
        CdiContainer cc = CdiContainerLoader.getCdiContainer();
        Assert.assertNotNull(cc);

        cc.boot();
        cc.getContextControl().startContexts();

        BeanManager bm = cc.getBeanManager();
        Assert.assertNotNull(bm);
       
View Full Code Here

    public void testSimpleContainerBoot()
    {
        CdiContainer cc = CdiContainerLoader.getCdiContainer();
        Assert.assertNotNull(cc);

        cc.boot();
        cc.getContextControl().startContexts();

        BeanManager bm = cc.getBeanManager();
        Assert.assertNotNull(bm);
View Full Code Here

    public void testRestartContexts()
    {
        CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer();
        Assert.assertNotNull(cdiContainer);

        cdiContainer.boot();
        cdiContainer.getContextControl().startContexts();

        BeanManager beanManager = cdiContainer.getBeanManager();
        Assert.assertNotNull(beanManager);
View Full Code Here

    public void testShutdownWithInactiveContexts()
    {
        CdiContainer cdiContainer = CdiContainerLoader.getCdiContainer();
        Assert.assertNotNull(cdiContainer);

        cdiContainer.boot();
        cdiContainer.getContextControl().startContexts();

        // now do some random stuff
        BeanManager beanManager = cdiContainer.getBeanManager();
        Assert.assertNotNull(beanManager);
View Full Code Here

{
    @Test
    public void ensureDataSourceExist()
    {
        final CdiContainer container = CdiContainerLoader.getCdiContainer();
        container.boot(new HashMap<Object, Object>()
        {{
            put("foo", "new://Resource?type=DataSource");
            put("foo.JdbcUrl", "jdbc:hsqldb:mem:foo");
            put("foo.JtaManaged", "false");
        }});
View Full Code Here

    @Test
    public void basicInjection() // useless because of tcks but nice to have when working on this specific container
    {
        final CdiContainer container = CdiContainerLoader.getCdiContainer();
        container.boot();

        try
        {
            final BeanManager beanManager = container.getBeanManager();
            assertEquals("foo", Foo.class.cast(beanManager.getReference(beanManager.resolve(beanManager.getBeans(Foo.class)), Foo.class, null)).name());
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.