CDV ❯ Figure out why modifying a shared object from on-load didn't give an exception
-
Bug
-
Status: Resolved
-
2 Major
-
Resolution: Won't Fix
-
-
-
interfaces
-
Reporter: stulscot
-
December 21, 2009
-
0
-
Watchers: 3
-
February 12, 2014
-
February 12, 2014
Attachments
Description
Any modifications made to distributed objects don’t seem to be propagated during the on-load initialisation.
In the attached example each node adds its DsoNode to a HashSet in the method configured in the
If line 40 of OnLoadTest.java is uncommented and the
If this is the correct behaviour then it should be clearly stated in the documentation that code called to initialise the object when faulted in should not modify distributed objects in any way.
The example can be compiled with ‘javac -cp terracotta-api-1.1.0.jar OnLoadTest.java’.
Comments
Steve Harris 2009-12-21
Stuart Scott 2010-01-06
Since meaningful exceptions are thrown when a shared object is modified without holding a lock, would it not be appropriate in this case to also throw an exception? The current behaviour silently modifies the local instance of the shared object while not propagating changes. Also the documentation regarding this behaviour is rather vague.
Steve Harris 2010-01-06
Yeah, I’m kinda suprised it doesn’t. We’ll have to take a look
Hung Huynh 2014-02-12
DSO is discontinued
That’s intentionally. On-load is designed for updating transient and or local state.