On 26/04/2010 06:00, Peter Roßbach wrote:
HI Mark,
your are right! But then we can use:
CatalinaCluster cluster = getCluster() ;
if(cluster != null) {
Valve[] valves = cluster.getValves();
Done.
..
and also we can optimized the "for"-statement to
for(Valve valve: valves) {
if(valve instanceof ReplicationValve) {
replicationValve = (ReplicationValve)valve ;
break;
}
}
Not without changing when the debug message gets logged. Not sure we
want to do that. I'll leave further optimisations of this but to you
since you know the code better than I do.
And I think the replicationValve must be declared as volatile.
Agreed. Done.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org