-
Feature Request
-
Resolution: Done
-
Major
-
JBossAS-4.0.3 SP1
-
None
-
Compatibility/Configuration
I AM able to override tomcat's connector port settings with the ServiceBindingManager ...
BUT not to my complete satisfaction.
The only possibility offerered by XSLTFileDelegate is to pass a host or port parameter - unfortunately, the xslt-param element is not processed, as in the sibling XSLTConfigDelegate. As a consequence, $portAJP can only be computed from $port, but not passed directly as a parameter.
This bug also affects the documentation (The JBoss 4 Application Server Guide
JBoss AS 4.0.3, Release 4), since on page 334 it states that
"The XSLTConfigDelegate is used to transform services whose port/interface configuration is specified using a
nested XML fragment. The following example maps the Tomcat servlet container listening port to 8180 and maps
the AJP listening port to 8109:"
This is wrong, because the example actually makes use of XSLTFileDelegate, which is really misleading.
It would be EXTREMELY easy to fix this bug by simply injecting the code from XSLTConfigDelegate into XSLTFileDelegate as follows (plus necessary import statements):
//[...]
if (host != null)
// +++++++++++++ MY MANUAL PATCH BEGIN
// Check for any arbitrary attributes
NodeList attributes = delegateConfig.getElementsByTagName("xslt-param");
// xslt-param are transform parameters
for(int a = 0; a < attributes.getLength(); a ++)
// +++++++++++++ MY MANUAL PATCH END
transformer.transform(xmlSource, xmlResult);
//[...]