Examples of InstanceManager


Examples of org.apache.tomcat.InstanceManager

                    ClassLoader loader = context.getLoader().getClassLoader();
                    Object listener = event.getData();
                   
                    if(listener.getClass().getName().equals("org.apache.webbeans.servlet.WebBeansConfigurationListener"))
                    {  
                        InstanceManager processor = context.getInstanceManager();
                        InstanceManager custom = new TomcatInstanceManager(context.getLoader().getClassLoader(),processor);
                        context.setInstanceManager(custom);
                       
                        context.getServletContext().setAttribute(InstanceManager.class.getName(), custom);
                       
                        ContextAccessController.setReadOnly(context.getNamingContextListener().getName());
View Full Code Here

Examples of org.apache.tomcat.InstanceManager

                unavailable(null);
                throw new ServletException
                    (sm.getString("standardWrapper.notClass", getName()));
            }

            InstanceManager instanceManager = ((StandardContext)getParent()).getInstanceManager();
            try {
                servlet = (Servlet) instanceManager.newInstance(servletClass);
            } catch (ClassCastException e) {
                unavailable(null);
                // Restore the context ClassLoader
                throw new ServletException
                    (sm.getString("standardWrapper.notServlet", servletClass), e);
View Full Code Here

Examples of org.apache.tomcat.InstanceManager

    }

    public void destroyInstance(Object instance)
            throws IllegalAccessException, InvocationTargetException
    {
        InstanceManager manager = instanceManagers
                .get(ClassUtils.getContextClassLoader());

        if (manager != null)
        {
            manager.destroyInstance(instance);
        }
    }
View Full Code Here

Examples of org.apache.tomcat.InstanceManager

    }

    public void postConstruct(Object instance)
            throws IllegalAccessException, InvocationTargetException
    {
        InstanceManager manager = instanceManagers
                .get(ClassUtils.getContextClassLoader());
        if (manager == null)
        {
            //Initialize manager
            manager = initManager();
        }

        //Is initialized
        if (manager != null)
        {
            //Inject resources
            try
            {
                manager.newInstance(instance);
            }
            catch (NamingException e)
            {
                throw new FacesException(e);
            }
View Full Code Here

Examples of org.apache.tomcat.InstanceManager

        }

        // get application map to access ServletContext attributes
        Map<String, Object> applicationMap = extCtx.getApplicationMap();

        InstanceManager instanceManager = (InstanceManager)
                applicationMap.get(InstanceManager.class.getName());
        if (instanceManager != null)
        {
            instanceManagers.put(ClassUtils.getContextClassLoader(),
                    instanceManager);
View Full Code Here

Examples of org.apache.tomcat.InstanceManager

                unavailable(null);
                throw new ServletException
                    (sm.getString("standardWrapper.notClass", getName()));
            }

            InstanceManager instanceManager = ((StandardContext)getParent()).getInstanceManager();
            try {
                servlet = (Servlet) instanceManager.newInstance(servletClass);
            } catch (ClassCastException e) {
                unavailable(null);
                // Restore the context ClassLoader
                throw new ServletException
                    (sm.getString("standardWrapper.notServlet", servletClass), e);
View Full Code Here

Examples of org.apache.tomcat.InstanceManager

                unavailable(null);
                throw new ServletException
                    (sm.getString("standardWrapper.notClass", getName()));
            }

            InstanceManager instanceManager = ((StandardContext)getParent()).getInstanceManager();
            try {
                servlet = (Servlet) instanceManager.newInstance(servletClass);
            } catch (ClassCastException e) {
                unavailable(null);
                // Restore the context ClassLoader
                throw new ServletException
                    (sm.getString("standardWrapper.notServlet", servletClass), e);
View Full Code Here

Examples of org.apache.tomcat.InstanceManager

                unavailable(null);
                throw new ServletException
                    (sm.getString("standardWrapper.notClass", getName()));
            }

            InstanceManager instanceManager = ((StandardContext)getParent()).getInstanceManager();
            try {
                servlet = (Servlet) instanceManager.newInstance(servletClass);
            } catch (ClassCastException e) {
                unavailable(null);
                // Restore the context ClassLoader
                throw new ServletException
                    (sm.getString("standardWrapper.notServlet", servletClass), e);
View Full Code Here

Examples of org.apache.tomcat.InstanceManager

                unavailable(null);
                throw new ServletException
                    (sm.getString("standardWrapper.notClass", getName()));
            }

            InstanceManager instanceManager = ((StandardContext)getParent()).getInstanceManager();
            try {
                servlet = (Servlet) instanceManager.newInstance(servletClass);
            } catch (ClassCastException e) {
                unavailable(null);
                // Restore the context ClassLoader
                throw new ServletException
                    (sm.getString("standardWrapper.notServlet", servletClass), e);
View Full Code Here

Examples of org.apache.tomcat.InstanceManager

                    destroy();
                   
                    Servlet servlet = null;

                    try {
                        InstanceManager instanceManager = InstanceManagerFactory.getInstanceManager(config);
                        servlet = (Servlet) instanceManager.newInstance(ctxt.getFQCN(), ctxt.getJspLoader());
                    } catch (IllegalAccessException e) {
                        throw new JasperException(e);
                    } catch (InstantiationException e) {
                        throw new JasperException(e);
                    } catch (Exception e) {
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.