You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2003/01/28 00:40:14 UTC
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardHostDeployer.java
costin 2003/01/27 15:40:13
Modified: catalina/src/share/org/apache/catalina/core
StandardHostDeployer.java
Log:
Changed to c-l.
Set the class loader on digester - it seems the HEAD works better this way.
Revision Changes Path
1.6 +24 -26 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java
Index: StandardHostDeployer.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- StandardHostDeployer.java 15 Jan 2003 03:40:42 -0000 1.5
+++ StandardHostDeployer.java 27 Jan 2003 23:40:13 -0000 1.6
@@ -1,7 +1,4 @@
/*
- * $Header$
- * $Revision$
- * $Date$
*
* ====================================================================
*
@@ -99,6 +96,8 @@
public class StandardHostDeployer implements Deployer {
+ private static org.apache.commons.logging.Log log=
+ org.apache.commons.logging.LogFactory.getLog( StandardHostDeployer.class );
// ----------------------------------------------------------- Constructors
@@ -128,6 +127,12 @@
/**
+ * The <code>ContextRuleSet</code> associated with our
+ * <code>digester</code> instance.
+ */
+ private ContextRuleSet contextRuleSet = null;
+
+ /**
* The <code>Digester</code> instance to use for deploying web applications
* to this <code>Host</code>. <strong>WARNING</strong> - Usage of this
* instance must be appropriately synchronized to prevent simultaneous
@@ -135,14 +140,6 @@
*/
private Digester digester = null;
-
- /**
- * The <code>ContextRuleSet</code> associated with our
- * <code>digester</code> instance.
- */
- private ContextRuleSet contextRuleSet = null;
-
-
/**
* The <code>StandardHost</code> instance we are associated with.
*/
@@ -229,7 +226,7 @@
(sm.getString("standardHost.warRequired"));
// Calculate the document base for the new web application
- host.log(sm.getString("standardHost.installing",
+ log.info(sm.getString("standardHost.installing",
contextPath, war.toString()));
String url = war.toString();
String docBase = null;
@@ -307,9 +304,10 @@
host.fireContainerEvent(PRE_INSTALL_EVENT, context);
host.addChild(context);
host.fireContainerEvent(INSTALL_EVENT, context);
+ } catch (ClassNotFoundException e) {
+ log.info("", e);
} catch (Exception e) {
- host.log(sm.getString("standardHost.installError", contextPath),
- e);
+ log.info("Error installing", e);
throw new IOException(e.toString());
}
@@ -364,7 +362,7 @@
(sm.getString("standardHost.warRequired"));
// Calculate the document base for the new web application
- host.log(sm.getString("standardHost.installing",
+ log.info(sm.getString("standardHost.installing",
contextPath, war.toString()));
String url = war.toString();
String docBase = null;
@@ -401,8 +399,8 @@
StandardServer server = (StandardServer) engine.getService().getServer();
server.storeContext(context);
} catch (Exception e) {
- host.log(sm.getString("standardHost.installError", contextPath),
- e);
+ log.error(sm.getString("standardHost.installError", contextPath),
+ e);
throw new IOException(e.toString());
}
@@ -451,7 +449,7 @@
String docBase = null; // Optional override for value in config file
if (war != null) {
String url = war.toString();
- host.log(sm.getString("standardHost.installingWAR", url));
+ log.info(sm.getString("standardHost.installingWAR", url));
// Calculate the WAR file absolute pathname
if (url.startsWith("jar:")) {
url = url.substring(4, url.length() - 2);
@@ -474,6 +472,7 @@
stream = config.openStream();
Digester digester = createDigester();
digester.setDebug(host.getDebug());
+ digester.setClassLoader(this.getClass().getClassLoader());
digester.clear();
digester.push(this);
digester.parse(stream);
@@ -559,12 +558,12 @@
(sm.getString("standardHost.pathMissing", contextPath));
// Remove this web application
- host.log(sm.getString("standardHost.removing", contextPath));
+ log.info(sm.getString("standardHost.removing", contextPath));
try {
host.removeChild(context);
host.fireContainerEvent(REMOVE_EVENT, context);
} catch (Exception e) {
- host.log(sm.getString("standardHost.removeError", contextPath), e);
+ log.error(sm.getString("standardHost.removeError", contextPath), e);
throw new IOException(e.toString());
}
@@ -719,11 +718,11 @@
if (context == null)
throw new IllegalArgumentException
(sm.getString("standardHost.pathMissing", contextPath));
- host.log("standardHost.start " + contextPath);
+ log.info("standardHost.start " + contextPath);
try {
((Lifecycle) context).start();
} catch (LifecycleException e) {
- host.log("standardHost.start " + contextPath + ": ", e);
+ log.info("standardHost.start " + contextPath + ": ", e);
throw new IllegalStateException
("standardHost.start " + contextPath + ": " + e);
}
@@ -756,11 +755,11 @@
if (context == null)
throw new IllegalArgumentException
(sm.getString("standardHost.pathMissing", contextPath));
- host.log("standardHost.stop " + contextPath);
+ log.info("standardHost.stop " + contextPath);
try {
((Lifecycle) context).stop();
} catch (LifecycleException e) {
- host.log("standardHost.stop " + contextPath + ": ", e);
+ log.error("standardHost.stop " + contextPath + ": ", e);
throw new IllegalStateException
("standardHost.stop " + contextPath + ": " + e);
}
@@ -816,7 +815,6 @@
* context configuration descriptor for an application.
*/
protected Digester createDigester() {
-
if (digester == null) {
digester = new Digester();
if (host.getDebug() > 0)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>