hello guys;
I'm trying to share an Arraylist between a java class and a web application.
in my tc-config.xml, i've added the autolock stanzas with write level, and specified the arraylist as root. But i don't have any synchronized() word. it raises an error that says that i have to do so, what about the transparence of Terracotta if the autolock stanzas don't do anything unless there is synchronisation in the program lines for the shared object ???
You can add an auto-synchronized=true attribute to the auto-lock XML element, if you do not wish to modify source code. I wouldn't carry the "transparency" analogue too far - since it really means that if you have a correct app (correct from a multi-threaded perspective) then you'll enjoy the benefits of transparency when you scale out to multiple-JVMs.