Bug 36866

Summary: <Cluster> "name" attr. should actually be "clusterName"
Product: Tomcat 5 Reporter: Adam Mlodzinski <adam.mlodzinski>
Component: Native:PackagingAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: trivial    
Priority: P2    
Version: 5.5.9   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Adam Mlodzinski 2005-09-29 19:56:35 UTC
This is an issue with the default server.xml file. I hope I chose the correct
Component

The org.apache.catalina.Cluster interface defines methods named "setClusterName"
and "getClusterName", implying a property named "clusterName".  However, the
server.xml for every version of Tomcat that I've looked at (5.0.18, 5.0.29,
5.5.9, 5.5.12-alpha) indicates a <Cluster> attribute called "name". The earlier
5.0 releases even include 'name="FilipsCluster"' in the commented-out sample
<Cluster> config.

The problem is that the server.xml should not indicate an attribute called
"name" for the <Cluster> element, rather the same attribute should be called
"clusterName".  Indeed, setting the <Cluster> attribute "name" (and not
"clusterName") causes "getClusterName" to return null - but setting a <Cluster>
attribute called "clusterName" returns the specified value in  a call to
"getClusterName".

The fix is trivial - replace the name of the <Cluster> attribute "name" with
"clusterName" throughout the server.xml file (2 places in early 5.0 server.xml
files, only 1 place in later builds).  This is an easy thing for users to do,
but finding the problem in the first place is the tricky part.
Comment 1 Yoav Shapira 2005-10-17 00:57:49 UTC
Corrected attribute name documentation in conf/server.xml.  Thanks for pointing
this out.