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 2019/07/16 19:17:36 UTC

[tomcat] branch master updated: Add end callback for set properties

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new 1dbd439  Add end callback for set properties
1dbd439 is described below

commit 1dbd43973c1a2c2c4a6b675741d06fc2ba3cf2d0
Author: remm <re...@apache.org>
AuthorDate: Tue Jul 16 21:17:24 2019 +0200

    Add end callback for set properties
    
    When processing server.xml, there is no notification of the end of
    configuration for objects. In some rare cases, it could be useful and
    the next opportunity (Catalina lifecycle) comes way later. As a result,
    add a trivial callback to address this and allow some processing on the
    properties while still in the stage of processing server.xml.
---
 java/org/apache/tomcat/util/digester/SetPropertiesRule.java | 8 ++++++++
 webapps/docs/changelog.xml                                  | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/java/org/apache/tomcat/util/digester/SetPropertiesRule.java b/java/org/apache/tomcat/util/digester/SetPropertiesRule.java
index a3b38c7..78c976c 100644
--- a/java/org/apache/tomcat/util/digester/SetPropertiesRule.java
+++ b/java/org/apache/tomcat/util/digester/SetPropertiesRule.java
@@ -30,6 +30,10 @@ import org.xml.sax.Attributes;
 
 public class SetPropertiesRule extends Rule {
 
+    public interface Listener {
+        void endSetPropertiesRule();
+    }
+
     /**
      * Process the beginning of this element.
      *
@@ -78,6 +82,10 @@ public class SetPropertiesRule extends Rule {
             }
         }
 
+        if (top instanceof Listener) {
+            ((Listener) top).endSetPropertiesRule();
+        }
+
     }
 
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7963b3b..d686655 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -72,6 +72,9 @@
         PKCS#1 formatted private keys when configuring the internal, in-memory
         key store. (markt)
       </fix>
+      <update>
+        Add optional notifications when ending the set properties rule. (remm)
+      </update>
     </changelog>
   </subsection>
   <subsection name="Cluster">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org