[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
transparency of terracotta  XML
Forum Index -> Terracotta Platform
Author Message
twister

master

Joined: 12/19/2009 08:51:09
Messages: 59
Offline

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 ???
zeeiyer

consul

Joined: 05/24/2006 14:28:28
Messages: 493
Offline

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.

Also if you are sharing between a web app and a stand-alone app you'd need to define an app-group (Look for /tc:tc-config/application/dso/app-groups at http://open.terracottatech.com/confluence/display/docs32/Configuration+Guide+and+Reference#ConfigurationGuideandReference-ApplicationConfigurationSection).

hope this helps.


Sreeni Iyer, Terracotta.
Not a member yet - Click here to join the Terracotta Community
twister

master

Joined: 12/19/2009 08:51:09
Messages: 59
Offline

i've tryed the auto-synchronized = true but it leads to the same errors ==> attempt to access a shared object out of locked scope.
menfirst

journeyman

Joined: 02/09/2010 01:11:13
Messages: 32
Offline

Hi;
Some classes were not instrumented as well.
the problem is solved, and the locks wroked out.
 
Forum Index -> Terracotta Platform
Go to:   
Powered by JForum 2.1.7 © JForum Team