Examples of Loader


Examples of org.apache.catalina.Loader

        protected void processChildren(Container container) {
            ClassLoader originalClassLoader = null;

            try {
                if (container instanceof Context) {
                    Loader loader = ((Context) container).getLoader();
                    // Loader will be null for FailedContext instances
                    if (loader == null) {
                        return;
                    }
                    // Ensure background processing for Contexts and Wrappers
                    // is performed under the web app's class loader
                    originalClassLoader =
                            Thread.currentThread().getContextClassLoader();
                    Thread.currentThread().setContextClassLoader(
                            loader.getClassLoader());
                }
                container.backgroundProcess();
                Container[] children = container.findChildren();
                for (int i = 0; i < children.length; i++) {
                    if (children[i].getBackgroundProcessorDelay() <= 0) {
View Full Code Here

Examples of org.apache.catalina.Loader

    private DeltaRequest loadDeltaRequest(DeltaSession session, byte[] data) throws
        ClassNotFoundException, IOException {
        ByteArrayInputStream fis = null;
        ReplicationStream ois = null;
        Loader loader = null;
        ClassLoader classLoader = null;
        //fix to be able to run the DeltaManager
        //stand alone without a container.
        //use the Threads context class loader
        if ( container != null )
            loader = container.getLoader();
        if ( loader != null )
            classLoader = loader.getClassLoader();
        else
            classLoader = Thread.currentThread().getContextClassLoader();
        //end fix
        fis = new ByteArrayInputStream(data);
        ois = new ReplicationStream(fis,classLoader);
View Full Code Here

Examples of org.apache.catalina.Loader

        // Initialize our internal data structures
        //sessions.clear(); //should not do this
        // Open an input stream to the specified pathname, if any
        ByteArrayInputStream fis = null;
        ObjectInputStream ois = null;
        Loader loader = null;
        ClassLoader classLoader = null;
        try {
            fis = new ByteArrayInputStream(data);
            BufferedInputStream bis = new BufferedInputStream(fis);
            if (container != null)
                loader = container.getLoader();
            if (loader != null)
                classLoader = loader.getClassLoader();
            if (classLoader != null) {
                ois = new CustomObjectInputStream(bis, classLoader);
            } else {
                ois = new ObjectInputStream(bis);
            }
View Full Code Here

Examples of org.apache.catalina.Loader

        }
        Class clazz = Class.forName(className);
        Class types[] = { ClassLoader.class };
        Object args[] = { parentClassLoader };
        Constructor constructor = clazz.getDeclaredConstructor(types);
        Loader loader = (Loader) constructor.newInstance(args);

        // Push the new loader onto the stack
        digester.push(loader);
        if (digester.getLogger().isDebugEnabled())
            digester.getLogger().debug("new " + loader.getClass().getName());

    }
View Full Code Here

Examples of org.apache.catalina.Loader

    }

    public void end(String namespace, String name)
        throws Exception {

        Loader loader = (Loader) digester.pop();
        if (digester.getLogger().isDebugEnabled())
            digester.getLogger().debug("pop " + loader.getClass().getName());

    }
View Full Code Here

Examples of org.apache.catalina.Loader

    public int getMapSendOptions() {
        return mapSendOptions;
    }
   
    public ClassLoader[] getClassLoaders() {
        Loader loader = null;
        ClassLoader classLoader = null;
        loader = this.getLoader();
        if (loader != null) classLoader = loader.getClassLoader();
        if ( classLoader == null ) classLoader = Thread.currentThread().getContextClassLoader();
        if ( classLoader == Thread.currentThread().getContextClassLoader() ) {
            return new ClassLoader[] {classLoader};
        } else {
            return new ClassLoader[] {classLoader,Thread.currentThread().getContextClassLoader()};
View Full Code Here

Examples of org.apache.catalina.Loader

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

            // Acquire an instance of the class loader to be used
            Loader loader = getLoader();
            if (loader == null) {
                unavailable(null);
                throw new ServletException
                    (sm.getString("standardWrapper.missingLoader", getName()));
            }

            ClassLoader classLoader = loader.getClassLoader();

            // Special case class loader for a container provided servlet
            // 
            if (isContainerProvidedServlet(actualClass) &&
                    ! ((Context)getParent()).getPrivileged() ) {
View Full Code Here

Examples of org.apache.juddi.util.Loader

        }
      }
      //Adding this to make maven happy, what maven wants, maven gets.
      if (is==null) {
          log.debug("Trying the classloader of the class itself. (workaround for maven2)");
          Loader loader = new Loader();
          is = loader.getResourceAsStreamFromClass(propFile);
      }
     
      if (is != null)
      {
        log.debug("Resources loaded from: "+propFile);
View Full Code Here

Examples of org.apache.juddi.util.Loader

  public void executeSql(String resource, Connection conn, String tablePrefix) throws Exception
  {
        InputStream is = Loader.getResourceAsStream(resource);
        if (is == null) {
            log.debug("Trying the classloader of the class itself. (workaround for maven2)");
            Loader loader = new Loader();
            is = loader.getResourceAsStreamFromClass(resource);
        }
        String sql = getString(is);
        sql = sql.replaceAll("(?m)^--([^\n]+)?$", ""); // Remove all commented lines
        sql = sql.replaceAll("\\$\\{prefix}", tablePrefix);
        is.close();
View Full Code Here

Examples of org.apache.sling.jcr.base.internal.loader.Loader

     *            framework for namespacing setup
     * @param repository The {@code SlingRepository} to register namespaces on
     */
    protected void setup(final BundleContext bundleContext, final SlingRepository repository) {
        this.sessionProxyHandler = new SessionProxyHandler(this);
        this.namespaceHandler = new Loader(repository, bundleContext);
    }
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.