-
Bug
-
Resolution: Done
-
Major
-
JBossAS-5.1.0.CR1, JBossAS-5.1.0.GA, 6.0.0.M2
-
None
Access to the private boolean lookupSucceeded field is not controlled.
It should be volatile with an initial false value and only set to true when an acceptable result is received. The only state change is to true.
TruthfulResponseFilterUnitTestCase is intermittently failing, probably for the same reason. Here is the logging it generates when it fails: threads OOB-16 and OOB-15 are concurrently executing in the isAcceptableMethod().
2010-04-14 19:42:15,188 DEBUG [org.jboss.test.cluster.rspfilter.Echo] (RMI TCP Connection(70)-10.16.93.33) callEchoOnCluster(true, false, org.jboss.test.cluster.rspfilter.TruthfulResponseFilter@34a502)
2010-04-14 19:42:15,201 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-16,null) isAcceptable (true) from 10.16.93.34:55200
2010-04-14 19:42:15,202 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-15,null) isAcceptable (false) from 10.16.93.33:55200
2010-04-14 19:42:15,202 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-16,null) Lookup succeded from 10.16.93.34:55200
2010-04-14 19:42:15,202 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-15,null) needMoreResponses? true
2010-04-14 19:42:15,202 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-16,null) needMoreResponses? true
I'll also change LookupSucceededFilter.isAcceptable() to return false if the response is null, Exception or NoHandlerForRpc. HAPartition or HAJNDI.lookupRemotely() already ignore such values so there is no point accepting them.
- blocks
-
JBPAPP-4113 LookupSucceededFilter is not thread safe
- Closed
- is related to
-
JBAS-5703 Make HA-JNDI use wait for first positive response
- Closed