My patch for introducing valves which can be configured to take
parameters actually /did/ contain a bug.
The bug was in the deloyment/dol part of the code. In ValveNode I forgot
to add the code which iterates over each Node when writing out XML.
Thanks to Hong's hints about adding the jvm-option -Dwriteout.xml to
domains.xml I was able to detect this ommission.
This way I finally also found out when the method writeDescriptor() gets
called ;-)
Now as I wrote in my answer to the committer mail I am a bit unsure
about procedures. I've found a guidelines page on the wiki which among
other things says that commits have to be reviewed - thus I've attached
a diff to this mail. The review should be pretty straightforward given
the extreme smallness of this patch. If I have to consider anything
else, please let me know.
Thanks,
--
Wolfram Rittmeyer
Index: dol/src/main/java/com/sun/enterprise/deployment/node/runtime/web/ValveNode.java
===================================================================
--- dol/src/main/java/com/sun/enterprise/deployment/node/runtime/web/ValveNode.java (revision 24789)
+++ dol/src/main/java/com/sun/enterprise/deployment/node/runtime/web/ValveNode.java (working copy)
@@ -38,7 +38,6 @@
import com.sun.enterprise.deployment.node.XMLElement;
import com.sun.enterprise.deployment.runtime.web.Valve;
-import com.sun.enterprise.deployment.runtime.web.WebProperty;
import com.sun.enterprise.deployment.xml.RuntimeTagNames;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -99,4 +98,20 @@
return valve;
}
+
+ /**
+ * write the descriptor class to a DOM tree and return it
+ *
+ * @param parent node for the DOM tree
+ * @param node name for the descriptor
+ * @param the array of descriptors to write
+ */
+ public void writeDescriptor(Node parent, String nodeName, Valve[] valves) {
+ if (valves == null) {
+ return;
+ }
+ for (int i = 0; i < valves.length; i++) {
+ writeDescriptor(parent, nodeName, valves[i]);
+ }
+ }
}