Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- This is copied from the Tomcat 6.0 source tree. The following code is
- licensed to the Apache Software Foundation. See http://tomcat.apache.org/
- for more information.
- */
- /**
- * Reload this web application, if reloading is supported.
- * <p>
- * <b>IMPLEMENTATION NOTE</b>: This method is designed to deal with
- * reloads required by changes to classes in the underlying repositories
- * of our class loader. It does not handle changes to the web application
- * deployment descriptor. If that has occurred, you should stop this
- * Context and create (and start) a new Context instance instead.
- *
- * @exception IllegalStateException if the <code>reloadable</code>
- * property is set to <code>false</code>.
- */
- public synchronized void reload() {
- // Validate our current component state
- if (!started)
- throw new IllegalStateException
- (sm.getString("containerBase.notStarted", logName()));
- // Make sure reloading is enabled
- // if (!reloadable)
- // throw new IllegalStateException
- // (sm.getString("standardContext.notReloadable"));
- if(log.isInfoEnabled())
- log.info(sm.getString("standardContext.reloadingStarted"));
- // Stop accepting requests temporarily
- setPaused(true);
- try {
- stop();
- } catch (LifecycleException e) {
- log.error(sm.getString("standardContext.stoppingContext"), e);
- }
- try {
- start();
- } catch (LifecycleException e) {
- log.error(sm.getString("standardContext.startingContext"), e);
- }
- setPaused(false);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement