Package org.jboss.weld.manager

Examples of org.jboss.weld.manager.BeanManagerImpl.instance()


            } catch (ContextNotActiveException e) {
                activeBeforeApplyRequestValues = false;
            }
        }
        if (event.getPhaseId().equals(PhaseId.RENDER_RESPONSE)) {
            Conversation conversation = beanManager.instance().select(Conversation.class).get();
            HttpServletResponse response = (HttpServletResponse) event.getFacesContext().getExternalContext().getResponse();
            response.addHeader(CID_HEADER_NAME, conversation.getId() == null ? " null" : conversation.getId());
            response.addHeader(LONG_RUNNING_HEADER_NAME, String.valueOf(!conversation.isTransient()));
            response.addHeader(Cloud.RAINED_HEADER_NAME, new Boolean(beanManager.instance().select(Cloud.class).get().isRained()).toString());
            response.addHeader(ACTIVE_BEFORE_APPLY_REQUEST_VALUES_HEADER_NAME, new Boolean(activeBeforeApplyRequestValues).toString());
View Full Code Here


        if (event.getPhaseId().equals(PhaseId.RENDER_RESPONSE)) {
            Conversation conversation = beanManager.instance().select(Conversation.class).get();
            HttpServletResponse response = (HttpServletResponse) event.getFacesContext().getExternalContext().getResponse();
            response.addHeader(CID_HEADER_NAME, conversation.getId() == null ? " null" : conversation.getId());
            response.addHeader(LONG_RUNNING_HEADER_NAME, String.valueOf(!conversation.isTransient()));
            response.addHeader(Cloud.RAINED_HEADER_NAME, new Boolean(beanManager.instance().select(Cloud.class).get().isRained()).toString());
            response.addHeader(ACTIVE_BEFORE_APPLY_REQUEST_VALUES_HEADER_NAME, new Boolean(activeBeforeApplyRequestValues).toString());
        }
    }

    public PhaseId getPhaseId() {
View Full Code Here

        final WeldBootstrap bootstrap = new WeldBootstrap();
        bootstrap.startContainer(Environments.EE, deployment).startInitialization().deployBeans().validateBeans().endInitialization();

        try {
            final BeanManagerImpl manager = bootstrap.getManager(bda);
            final SpecialResource resource = manager.instance().select(SpecialResource.class).get();
            Assert.assertNotNull(resource);
            Assert.assertEquals(resource.getName(), TestInjectionServices.RESOURCE_NAME);
        } finally {
            bootstrap.shutdown();
        }
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.