am trying to test the clustering of List objects. So, I declared a List object as a shared root in my class and is trying to add some objects to the ArrayList. But, I get the following exception inspite of declaring a named write lock on add() method (or infact all the methods) of ArrayList....
Exception in thread "main" com.tc.object.tx.UnlockedSharedObjectException: Thread [main] has attempted to access a shared object (an instance of java.util.ArrayList) without first getting a shared lock. Please specifiy a lock for this access via your Terracotta configuration
would this be because of TC using its own ArrayList as part of its instrumented classes???
Please help on what is causing this...
Yes, the Java util classes are special cases that cannot be named locked. Instead of placing the write lock on the actual add method of the java.util.ArrayList class, put the lock on the methods that are calling the add().
Product Support Manager