Examples of WebBeansContext


Examples of org.apache.webbeans.config.WebBeansContext

                cookieConfig.setMaxAge(webAppInfo.sessionConfig.sessionCookieConfig.maxAge);
            }
        }
        //supply web.xml to jasper
        webAppContext.setAttribute(JASPER_WEB_XML_NAME, originalSpecDD);
        WebBeansContext webBeansContext;
        if (sharedOwbContext == null) {
            webBeansContext = OpenWebBeansWebInitializer.newWebBeansContext(null);
        } else {
            webBeansContext= sharedOwbContext.getOWBContext();
        }
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

        // Set ComponentContext BeforeAfter
        if (enc != null) {
            interceptor = new ComponentContextBeforeAfter(interceptor, index++, enc);
        }

        WebBeansContext owbContext = ctx.getOWBContext();
        if (owbContext == null) {
            //hopefully for tests only
            owbContext = OpenWebBeansWebInitializer.newWebBeansContext(null);
        }
        OpenWebBeansWebInitializer.initializeServletContext(owbContext, servletContext);
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

        this.classLoader = classLoader;
        this.context = context;
    }

    public Object newInstance(String fqcn, ClassLoader classLoader) throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException, ClassNotFoundException {
        WebBeansContext oldContext = null;
        try {
            oldContext = GeronimoSingletonService.contextEntered(owbContext);
            return holder.newInstance(fqcn, classLoader, context);
        } catch (IllegalAccessException e) {
            throw e;
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

            GeronimoSingletonService.contextExited(oldContext);
        }
    }

    public Object newInstance(String className) throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException, ClassNotFoundException {
        WebBeansContext oldContext = null;
        try {
            //TODO Specification 13.4.1 p125
            //The @ServletSecurity annotation is not applied to the url-patterns of a ServletRegistration created using the addServlet(String, Servlet)  method of the ServletContext interface,
            //unless the Servlet was constructed by the createServlet method of the ServletContext interface.
            oldContext = GeronimoSingletonService.contextEntered(owbContext);
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

            GeronimoSingletonService.contextExited(oldContext);
        }
    }

    public void destroyInstance(Object o) throws IllegalAccessException, InvocationTargetException {
        WebBeansContext oldContext = null;
        try {
            oldContext = GeronimoSingletonService.contextEntered(owbContext);
            holder.destroyInstance(o);
        } catch (Exception e) {
            throw new InvocationTargetException(e, "Attempted to destroy instance");
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

    }

    @Override
    public void initialize(StartupObject startupObject) {
        //share owb singletons
        WebBeansContext webBeansContext = startupObject.getAppContext().get(WebBeansContext.class);
        if (webBeansContext != null) {
            return;
        }
        Object old = contextEntered(null);
        try {
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

        }
 
        services.put(ContextsService.class, new CdiAppContextsService(true));
        services.put(ResourceInjectionService.class, new CdiResourceInjectionService());
        services.put(ScannerService.class, new CdiScanner());
        WebBeansContext webBeansContext = new WebBeansContext(services, properties);
        //must be last since it copies stuff
        OpenEJBLifecycle lifecycle = new OpenEJBLifecycle(webBeansContext);
        webBeansContext.registerService(ContainerLifecycle.class, lifecycle);

        WebBeansContext oldContext = GeronimoSingletonService.contextEntered(webBeansContext);
        try {
            //from OWB's WebBeansConfigurationListener

            try {
                if (startup == null) {
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

        }
        return webBeansContext;
    }

    public static void initializeServletContext(WebBeansContext webBeansContext, ServletContext servletContext) {
        WebBeansContext oldContext = GeronimoSingletonService.contextEntered(webBeansContext);
        try {
            OpenEJBLifecycle lifecycle = (OpenEJBLifecycle) webBeansContext.getService(ContainerLifecycle.class);
            lifecycle.startServletContext(servletContext);
        } finally {
            GeronimoSingletonService.contextExited(oldContext);
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

    public GeronimoSingletonService() {
    }

    public static WebBeansContext contextEntered(WebBeansContext newContext) {
        final WebBeansContext oldContext = contexts.get();
        contexts.set(newContext);
        return oldContext;
    }
View Full Code Here

Examples of org.apache.webbeans.config.WebBeansContext

    public WebBeansContext get(Object key) {
        return getContext();
    }

    private WebBeansContext getContext() {
        WebBeansContext context = contexts.get();
        if (context == null) {
            contexts.set(noContext);
        }
        return context;
    }
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.