Examples of WebBeansContext


Examples of org.apache.webbeans.config.WebBeansContext

    }

    public Object inject(Object o) throws OpenEJBException {

        try {
            final WebBeansContext webBeansContext = getAppContext().getWebBeansContext();

            final ConstructorInjectionBean<Object> beanDefinition = new ConstructorInjectionBean(webBeansContext, o.getClass()).complete();

            final CreationalContext<Object> creationalContext = webBeansContext.getBeanManagerImpl().createCreationalContext(beanDefinition);

            // Create bean instance
            final Context initialContext = (Context) new InitialContext().lookup("java:");
            final Context unwrap = InjectionProcessor.unwrap(initialContext);
            final InjectionProcessor injectionProcessor = new InjectionProcessor(o, injections, unwrap);
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

        contextsService.endContext(ConversationScoped.class, null);
    }

    private ContextsService getContextsService()
    {
        WebBeansContext webBeansContext = WebBeansContext.currentInstance();
        return webBeansContext.getContextsService();
    }
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

    private static final long serialVersionUID = -5690043082210295824L;

    @Override
    public void sessionWillPassivate(HttpSessionEvent event)
    {
        WebBeansContext webBeansContext = WebBeansContext.currentInstance();
        FailOverService failOverService = webBeansContext.getService(FailOverService.class);

        if (failOverService != null && failOverService.isSupportPassivation())
        {
            HttpSession session = event.getSession();
            failOverService.sessionWillPassivate(session);
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

    }

    @Override
    public void sessionDidActivate(HttpSessionEvent event)
    {
        WebBeansContext webBeansContext = WebBeansContext.currentInstance();
        FailOverService failOverService = webBeansContext.getService(FailOverService.class);

        if (failOverService != null && (failOverService.isSupportFailOver() || failOverService.isSupportPassivation()))
        {
            HttpSession session = event.getSession();
            failOverService.sessionDidActivate(session);
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

    /**
     * Used by serialization.
     */
    public FailOverBag()
    {
        WebBeansContext webBeansContext = WebBeansContext.currentInstance();

        this.failOverService = webBeansContext.getService(FailOverService.class);
        this.items = new HashMap<String, Object>();
    }
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

        this.items = new HashMap<String, Object>();
    }

    public FailOverBag(String sessionId, String jvmId)
    {
        WebBeansContext webBeansContext = WebBeansContext.currentInstance();

        this.failOverService = webBeansContext.getService(FailOverService.class);
        this.items = new HashMap<String, Object>();
        this.sessionId = sessionId;
        this.jvmId = jvmId;
    }
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

    /**
     * Default constructor.
     */
    public FailOverFilter()
    {
        WebBeansContext webBeansContext = WebBeansContext.currentInstance();
        failoverService = webBeansContext.getService(FailOverService.class);
    }
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

        initialServices.put(ScannerService.class,  dummyScannerService);

        // this is needed because of a dirty hack in the OpenWebBeansConfiguration
        initialServices.put(SecurityService.class, new SimpleSecurityService());

        webBeansContext = new WebBeansContext(initialServices, initialConfig);
        webBeansContext.getOpenWebBeansConfiguration().parseConfiguration();
    }
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

    protected void doStart() throws Exception {
        javax.naming.Context context = integrationContext.setContext();
        boolean txActive = integrationContext.isTxActive();
        SharedConnectorInstanceContext newContext = integrationContext.newConnectorInstanceContext(null);
        ConnectorInstanceContext connectorContext = integrationContext.setConnectorInstance(null, newContext);
        WebBeansContext oldOwbContext = integrationContext.contextEntered();
        try {
            setRestrictListeners(false);
            try {
                Assembler assembler = new Assembler();
                assembler.assemble(getServletContext(), webAppInfo);
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

    public void doScope(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        javax.naming.Context context = integrationContext.setContext();
        boolean txActive = integrationContext.isTxActive();
        SharedConnectorInstanceContext newContext = integrationContext.newConnectorInstanceContext(baseRequest);
        ConnectorInstanceContext connectorContext = integrationContext.setConnectorInstance(baseRequest, newContext);
        WebBeansContext owbContext = integrationContext.contextEntered();
        String oldApplicationIdentity = WebApplicationIdentity.getIdentity();
        WebApplicationIdentity.setIdentity(integrationContext.getWebApplicationIdentity());
        try {
            try {
                super.doScope(target, baseRequest, request, response);
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.