Bug 36866 - <Cluster> "name" attr. should actually be "clusterName"
<Cluster> "name" attr. should actually be "clusterName"
Status: RESOLVED FIXED
Product: Tomcat 5
Classification: Unclassified
Component: Native:Packaging
5.5.9
All All
: P2 trivial (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2005-09-29 19:56 UTC by Adam Mlodzinski
Modified: 2005-10-16 16:57 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.