Peter Firmstone created RIVER-420:
-------------------------------------

             Summary: Export during construction.
                 Key: RIVER-420
                 URL: https://issues.apache.org/jira/browse/RIVER-420
             Project: River
          Issue Type: Bug
            Reporter: Peter Firmstone


There are numerous occassions where an Exporter is used to export a Remote 
Object within the constructor allowing "this" to be published prior to the 
constructor completing.

Recent testing has revealed a failure on the Arm architecture caused by this 
escaping during construction in LeasedSpaceListener, see qa/src:

com.sun.jini.test.impl.outrigger.leasing.LeasedSpaceListener

and test:

com.sun.jini.test.impl.outrigger.leasing.UseNotifyLeaseTestRenew.td

Although it's too early to confirm 100%, the test appears to be passing now 
that "this" no longer escapes during construction.

By "this" escaping during construction, the proxy whose field was final 
appeared not to notify() correctly within a synchronized block, (this test uses 
notify() every 7ms, so it really gives it a hammering) as a result the test 
thought the resource was no longer available and failed.

This has wide ranging ramifications for River, as there are multiple instances 
where "this" is allowed to escape by an Exporter exporting during construction.

The service implementations, Reggie, Outrigger, Norm, Mahalo, Mercury and 
Fiddler have been fixed in skunk/qa_refactor.  However it isn't yet clear how 
to fix "this" escaping with Activation in Phoenix and ServiceStarter.

There are numerous instances of exporting during construction in the test 
infrastructure and our examples.  These will all need to be fixed prior to 
releasing River 2.3.0



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to