cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina Context.java

2004-07-26 Thread remm
remm2004/07/26 01:09:21

  Modified:catalina/src/share/org/apache/catalina/startup
HostConfig.java ContextRuleSet.java
   catalina/src/share/org/apache/catalina/core
StandardContext.java
   catalina/src/share/org/apache/catalina Context.java
  Added:   catalina/src/conf context.xml
  Log:
  - Add code to handle resource relaoding.
  - Add one extra element to Context (I couldn't find a way to avoid it).
  - Add a global context.xml file, to define two basic reload resources.
  - Now, I'll do the new anti locking code.
  
  Revision  ChangesPath
  1.36  +40 -27
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java
  
  Index: HostConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- HostConfig.java   25 Jul 2004 23:35:37 -  1.35
  +++ HostConfig.java   26 Jul 2004 08:09:19 -  1.36
  @@ -464,28 +464,28 @@
   // Assume this is a configuration descriptor and deploy it
   log.debug(sm.getString(hostConfig.deployDescriptor, files[i]));
   try {
  -Context newContext = null;
  +Context context = null;
   synchronized (digester) {
  -newContext = (Context) digester.parse(contextXml);
  +context = (Context) digester.parse(contextXml);
   }
  -if (newContext instanceof Lifecycle) {
  +if (context instanceof Lifecycle) {
   Class clazz = Class.forName(host.getConfigClass());
   LifecycleListener listener =
   (LifecycleListener) clazz.newInstance();
  -((Lifecycle) newContext).addLifecycleListener(listener);
  +((Lifecycle) context).addLifecycleListener(listener);
   }
  -newContext.setConfigFile(contextXml.getAbsolutePath());
  -newContext.setPath(contextPath);
  +context.setConfigFile(contextXml.getAbsolutePath());
  +context.setPath(contextPath);
   // Add the context XML to the list of watched files
   deployedApp.reloadResources.put
   (contextXml.getAbsolutePath(), new 
Long(contextXml.lastModified()));
   // Add the associated docBase to the redeployed list if it's a 
WAR
   boolean isWar = false;
  -if (newContext.getDocBase() != null) {
  -File docBase = new File(newContext.getDocBase());
  +if (context.getDocBase() != null) {
  +File docBase = new File(context.getDocBase());
   if (!docBase.isAbsolute()) {
   docBase = new File(new File(host.getAppBase()), 
  -newContext.getDocBase());
  +context.getDocBase());
   }
   deployedApp.redeployResources.put(docBase.getAbsolutePath(),
   new Long(docBase.lastModified()));
  @@ -493,21 +493,18 @@
   isWar = true;
   }
   }
  -host.addChild(newContext);
  +host.addChild(context);
   // Add the eventual unpacked WAR and all the resources which 
will be
   // watched inside it
  -if (isWar  unpackWARs  (newContext.getDocBase() != null)) {
  -File docBase = new File(newContext.getDocBase());
  +if (isWar  unpackWARs  (context.getDocBase() != null)) {
  +File docBase = new File(context.getDocBase());
   if (!docBase.isAbsolute()) {
   docBase = new File(new File(host.getAppBase()), 
  -newContext.getDocBase());
  +context.getDocBase());
   }
   deployedApp.redeployResources.put(docBase.getAbsolutePath(),
   new Long(docBase.lastModified()));
  -// FIXME: Add the list of reload resources as given by the 
context
  -//This list would by default contain 
/WEB-INF/web.xml and
  -///META-INF/context.xml
  -//Add new element in Context 

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina Context.java

2004-05-26 Thread yoavs
yoavs   2004/05/26 08:25:12

  Modified:catalina/src/share/org/apache/catalina Context.java
  Log:
  Minor JavaDoc fixes (Bugzilla 11212)
  
  Revision  ChangesPath
  1.12  +4 -4  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Context.java
  
  Index: Context.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Context.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Context.java  24 Mar 2004 20:00:22 -  1.11
  +++ Context.java  26 May 2004 15:25:12 -  1.12
  @@ -545,7 +545,7 @@
   /**
* Add a resource link for this web application.
*
  - * @param resource New resource link
  + * @param resourceLink New resource link
*/
   public void addResourceLink(ContextResourceLink resourceLink);
   
  @@ -1167,7 +1167,7 @@
   /**
* Set the validation feature of the XML parser used when
* parsing tlds files. 
  - * @param tldXmlValidation true to enable xml instance validation
  + * @param tldValidation true to enable xml instance validation
*/
   public void setTldValidation(boolean tldValidation);
   
  @@ -1190,7 +1190,7 @@
   /**
* Set the namespace aware feature of the XML parser used when
* parsing xml instances.
  - * @param xmlNamespaceAware true to enable namespace awareness
  + * @param tldNamespaceAware true to enable namespace awareness
*/
   public void setTldNamespaceAware(boolean tldNamespaceAware);
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]