You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2003/08/01 08:14:40 UTC
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardContext.java
remm 2003/07/31 23:14:40
Modified: catalina/src/share/org/apache/catalina/core
StandardContext.java
Log:
- Remove (for now) dead reload code.
Revision Changes Path
1.78 +1 -148 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
Index: StandardContext.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- StandardContext.java 31 Jul 2003 20:56:25 -0000 1.77
+++ StandardContext.java 1 Aug 2003 06:14:40 -0000 1.78
@@ -2744,153 +2744,6 @@
setPaused(false);
- if (true)
- return;
-
- // Binding thread
- ClassLoader oldCCL = bindThread();
-
- // Shut down our session manager
- if ((manager != null) && (manager instanceof Lifecycle)) {
- try {
- ((Lifecycle) manager).stop();
- } catch (LifecycleException e) {
- log.error(sm.getString("standardContext.stoppingManager"), e);
- }
- }
-
- // Shut down the current version of all active servlets
- Container children[] = findChildren();
- for (int i = 0; i < children.length; i++) {
- Wrapper wrapper = (Wrapper) children[i];
- if (wrapper instanceof Lifecycle) {
- try {
- ((Lifecycle) wrapper).stop();
- } catch (LifecycleException e) {
- log.error(sm.getString("standardContext.stoppingWrapper",
- wrapper.getName()),
- e);
- }
- }
- }
-
- // Shut down application event listeners
- listenerStop();
-
- // Clear all application-originated servlet context attributes
- if (context != null)
- context.clearAttributes();
-
- // Shut down filters
- filterStop();
-
- if (isUseNaming()) {
- // Start
- namingContextListener.lifecycleEvent
- (new LifecycleEvent(this, Lifecycle.STOP_EVENT));
- }
-
- // Binding thread
- unbindThread(oldCCL);
-
- // Shut down our application class loader
- if ((loader != null) && (loader instanceof Lifecycle)) {
- try {
- ((Lifecycle) loader).stop();
- } catch (LifecycleException e) {
- log.error(sm.getString("standardContext.stoppingLoader"), e);
- }
- }
-
- // Binding thread
- oldCCL = bindThread();
-
- // Restart our application class loader
- if ((loader != null) && (loader instanceof Lifecycle)) {
- try {
- ((Lifecycle) loader).start();
- } catch (LifecycleException e) {
- log.error(sm.getString("standardContext.startingLoader"), e);
- }
- }
-
- // Binding thread
- unbindThread(oldCCL);
-
- // Create and register the associated naming context, if internal
- // naming is used
- boolean ok = true;
- if (isUseNaming()) {
- // Start
- namingContextListener.lifecycleEvent
- (new LifecycleEvent(this, Lifecycle.START_EVENT));
- }
-
- // Binding thread
- oldCCL = bindThread();
-
- // Restart our application event listeners and filters
- if (ok) {
- if (!listenerStart()) {
- log.error(sm.getString("standardContext.listenerStartFailed"));
- ok = false;
- }
- }
- if (ok) {
- if (!filterStart()) {
- log.error(sm.getString("standardContext.filterStartFailed"));
- ok = false;
- }
- }
-
- // Restore the "Welcome Files" and "Resources" context attributes
- postResources();
- postWelcomeFiles();
-
- // Restart our currently defined servlets
- for (int i = 0; i < children.length; i++) {
- if (!ok)
- break;
- Wrapper wrapper = (Wrapper) children[i];
- if (wrapper instanceof Lifecycle) {
- try {
- ((Lifecycle) wrapper).start();
- } catch (LifecycleException e) {
- log.error(sm.getString("standardContext.startingWrapper",
- wrapper.getName()),
- e);
- ok = false;
- }
- }
- }
-
- // Reinitialize all load on startup servlets
- loadOnStartup(children);
-
- // Restart our session manager (AFTER naming context recreated/bound)
- if ((manager != null) && (manager instanceof Lifecycle)) {
- try {
- ((Lifecycle) manager).start();
- } catch (LifecycleException e) {
- log.error(sm.getString("standardContext.startingManager"), e);
- }
- }
-
- // Unbinding thread
- unbindThread(oldCCL);
-
- // Start accepting requests again
- if (ok) {
- log.info(sm.getString("standardContext.reloadingCompleted"));
- } else {
- setAvailable(false);
- log.error(sm.getString("standardContext.reloadingFailed"));
- }
- setPaused(false);
-
- // Notify our interested LifecycleListeners
- lifecycle.fireLifecycleEvent(Context.RELOAD_EVENT, null);
-
}