Package org.apache.catalina

Examples of org.apache.catalina.Loader


     * @throws IOException
     */
    public ReplicationStream getReplicationStream(byte[] data) throws 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);
        if ( classLoader == Thread.currentThread().getContextClassLoader() ) {
View Full Code Here


     * @throws IOException
     */
    public ReplicationStream getReplicationStream(byte[] data) throws 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);
        if ( classLoader == Thread.currentThread().getContextClassLoader() ) {
View Full Code Here

                (Globals.MBEAN_SERVER_ATTR,
                 MBeanUtils.createServer());
        }

        // Create the MBeans for the associated nested components
        Loader cLoader = context.getLoader();
        if (cLoader != null) {
            if (debug >= 4)
                log("Creating MBean for Loader " + cLoader);
            MBeanUtils.createMBean(cLoader);
        }
View Full Code Here

            log("Creating MBean for DefaultContext " + dcontext);
        MBeanUtils.createMBean(dcontext);
        dcontext.addPropertyChangeListener(this);
       
        // Create the MBeans for the associated nested components
        Loader dLoader = dcontext.getLoader();
        if (dLoader != null) {
            if (debug >= 4)
                log("Creating MBean for Loader " + dLoader);
            MBeanUtils.createMBean(dLoader);
        }
View Full Code Here

        if ((cLogger != null) && (cLogger != hLogger)) {
            if (debug >= 4)
                log("Destroying MBean for Logger " + cLogger);
            MBeanUtils.destroyMBean(cLogger);
        }
        Loader cLoader = context.getLoader();
        if (cLoader != null) {
            if (debug >= 4)
                log("Destroying MBean for Loader " + cLoader);
            MBeanUtils.destroyMBean(cLoader);
        }
View Full Code Here

            if (debug >= 4)
                log("Destroying MBean for Manager " + dManager);
            MBeanUtils.destroyMBean(dManager);
        }
       
        Loader dLoader = dcontext.getLoader();
        if (dLoader != null) {
            if (debug >= 4)
                log("Destroying MBean for Loader " + dLoader);
            MBeanUtils.destroyMBean(dLoader);
        }
View Full Code Here

            return;
        if (log.isDebugEnabled())
            log.debug(sm.getString("standardManager.loading", pathname));
        FileInputStream fis = null;
        ObjectInputStream ois = null;
        Loader loader = null;
        ClassLoader classLoader = null;
        try {
            fis = new FileInputStream(file.getAbsolutePath());
            BufferedInputStream bis = new BufferedInputStream(fis);
            if (container != null)
                loader = container.getLoader();
            if (loader != null)
                classLoader = loader.getClassLoader();
            if (classLoader != null) {
                if (log.isDebugEnabled())
                    log.debug("Creating custom object input stream for class loader ");
                ois = new CustomObjectInputStream(bis, classLoader);
            } else {
View Full Code Here

                Valve valves[] = ((Pipeline) context).getValves();
                storeElementArray(aWriter, indent, valves);
            }

            // Store nested <Loader> elements
            Loader loader = context.getLoader();
            storeElement(aWriter, indent, loader);

            // Store nested <Manager> elements
            Manager manager = context.getManager();
            storeElement(aWriter, indent, manager);
View Full Code Here

    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

        // 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;
        ClassLoader originalLoader = Thread.currentThread()
                .getContextClassLoader();
        try {

            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) {
                    if (log.isTraceEnabled())
                        log.trace(sm.getString(
                                "deltaManager.loading.withContextClassLoader",
                                getName()));
View Full Code Here

TOP

Related Classes of org.apache.catalina.Loader

Copyright © 2018 www.massapicom. 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.