<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "List in DSO"]]></title>
		<link>http://forums.terracotta.org/forums/posts/list/5.page</link>
		<description><![CDATA[Latest messages posted in the topic "List in DSO"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>List in DSO</title>
				<description><![CDATA[  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
at com.tc.object.tx.ClientTransactionManagerImpl.getTransaction(ClientTransactionManagerImpl.java:185)
at com.tc.object.tx.ClientTransactionManagerImpl.logicalInvoke(ClientTransactionManagerImpl.java:465)
at com.tc.object.TCObjectImpl.logicalInvoke(TCObjectImpl.java:261)
at com.tc.object.bytecode.ManagerImpl.logicalInvoke(ManagerImpl.java:390)
at com.tc.object.bytecode.ManagerUtil.logicalInvoke(ManagerUtil.java:70)
at java.util.ArrayList.add(ArrayList.java)

would this be because of TC using its own ArrayList as part of its instrumented classes???
Please help on what is causing this...

Thank You in advance
-stc]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/20.page#64</guid>
				<link>http://forums.terracotta.org/forums/posts/list/20.page#64</link>
				<pubDate><![CDATA[Wed, 24 May 2006 15:44:17]]> GMT</pubDate>
				<author><![CDATA[ Admin]]></author>
			</item>
			<item>
				<title>Re:List in DSO</title>
				<description><![CDATA[ stc,

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().

Bill

_________________
Bill Chever
Product Support Manager
Terracotta, Inc.]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/20.page#65</guid>
				<link>http://forums.terracotta.org/forums/posts/list/20.page#65</link>
				<pubDate><![CDATA[Wed, 24 May 2006 15:44:38]]> GMT</pubDate>
				<author><![CDATA[ Admin]]></author>
			</item>
	</channel>
</rss>