Methods Summary |
---|
public java.lang.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()};
}
|
public int | getMapSendOptions()
return mapSendOptions;
|
public javax.servlet.ServletContext | getServletContext()
if (context == null) {
context = new ReplApplContext(getBasePath(), this);
if (getAltDDName() != null)
context.setAttribute(Globals.ALT_DD_ATTR,getAltDDName());
}
return ((ReplApplContext)context).getFacade();
|
public void | lifecycleEvent(org.apache.catalina.LifecycleEvent event)//15 seconds
if ( event.getType() == AFTER_START_EVENT )
startComplete = true;
|
public void | setMapSendOptions(int mapSendOptions)
this.mapSendOptions = mapSendOptions;
|
public synchronized void | start()
if ( this.started ) return;
super.addLifecycleListener(this);
try {
CatalinaCluster catclust = (CatalinaCluster)this.getCluster();
if (this.context == null) this.context = new ReplApplContext(this.getBasePath(), this);
if ( catclust != null ) {
ReplicatedMap map = new ReplicatedMap(this,catclust.getChannel(),DEFAULT_REPL_TIMEOUT,
getName(),getClassLoaders());
map.setChannelSendOptions(mapSendOptions);
((ReplApplContext)this.context).setAttributeMap(map);
if (getAltDDName() != null) context.setAttribute(Globals.ALT_DD_ATTR, getAltDDName());
}
super.start();
} catch ( Exception x ) {
log.error("Unable to start ReplicatedContext",x);
throw new LifecycleException("Failed to start ReplicatedContext",x);
}
|
public synchronized void | stop()
ReplicatedMap map = (ReplicatedMap)((ReplApplContext)this.context).getAttributeMap();
if ( map!=null ) {
map.breakdown();
}
if ( !this.started ) return;
try {
super.lifecycle.removeLifecycleListener(this);
} catch ( Exception x ){
log.error("Unable to stop ReplicatedContext",x);
throw new LifecycleException("Failed to stop ReplicatedContext",x);
} finally {
this.startComplete = false;
super.stop();
}
|