FileDocCategorySizeDatePackage
ClusterManagerBase.javaAPI DocApache Tomcat 6.0.142863Fri Jul 20 04:20:32 BST 2007org.apache.catalina.ha.session

ClusterManagerBase

public abstract class ClusterManagerBase extends org.apache.catalina.session.ManagerBase implements PropertyChangeListener, org.apache.catalina.Lifecycle, org.apache.catalina.ha.ClusterManager
author
Filip Hanik
version
$Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $

Fields Summary
Constructors Summary
Methods Summary
public static java.lang.ClassLoader[]getClassLoaders(org.apache.catalina.Container container)

        Loader loader = null;
        ClassLoader classLoader = null;
        if (container != null) loader = container.getLoader();
        if (loader != null) classLoader = loader.getClassLoader();
        else classLoader = Thread.currentThread().getContextClassLoader();
        if ( classLoader == Thread.currentThread().getContextClassLoader() ) {
            return new ClassLoader[] {classLoader};
        } else {
            return new ClassLoader[] {classLoader,Thread.currentThread().getContextClassLoader()};
        }
    
public java.lang.ClassLoader[]getClassLoaders()

        return getClassLoaders(container);
    
public org.apache.catalina.tribes.io.ReplicationStreamgetReplicationStream(byte[] data)
Open Stream and use correct ClassLoader (Container) Switch ThreadClassLoader

param
data
return
The object input stream
throws
IOException

        return getReplicationStream(data,0,data.length);
    
public org.apache.catalina.tribes.io.ReplicationStreamgetReplicationStream(byte[] data, int offset, int length)

        ByteArrayInputStream fis = new ByteArrayInputStream(data, offset, length);
        return new ReplicationStream(fis, getClassLoaders());