<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Messages posted by "tg"]]></title>
		<link>http://forums.terracotta.org/forums/posts/listByUser/6045.page</link>
		<description><![CDATA[Messages posted by "tg"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Re:Ehcache sizeof oddity on 64-bit JVMs</title>
				<description><![CDATA[ While we could certainly do that this would mean that we have Hibernate entities in the cache that are still attached to a session (as a race condition until the original Hibernate session has been completed, which will detach the entity). I don't want to imagine what side-effects could result from this. ;-)]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/preList/6746/33961.page#33961</guid>
				<link>http://forums.terracotta.org/forums/posts/preList/6746/33961.page#33961</link>
				<pubDate><![CDATA[Wed, 7 Mar 2012 06:13:20]]> GMT</pubDate>
				<author><![CDATA[ tg]]></author>
			</item>
			<item>
				<title>Re:Ehcache sizeof oddity on 64-bit JVMs</title>
				<description><![CDATA[ After some further investigation the sizeof issue seems to occur on both 32 and 64 bit VMs. It just caught our attention on 64 bit, which is a lot more slower for this operation (probably it is spending considerably more time on GC as -Xmx is the same for both).

The root cause of the issue has also been identified. The association from SomeEntity to OtherEntity is represented as a org.hibernate.collection.PersistentList, which contains a reference to a session that effectively pulls in the whole Spring context. AFAICS the session is cleared when the entity is detached from the session, so I am currently looking for an elegant solution to achieve this session detachment while still retainign the declarative approach of the ehcache-spring-annotations.

Has someone else already encountered such a situation and could share his approach?]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/preList/6746/33959.page#33959</guid>
				<link>http://forums.terracotta.org/forums/posts/preList/6746/33959.page#33959</link>
				<pubDate><![CDATA[Wed, 7 Mar 2012 04:28:16]]> GMT</pubDate>
				<author><![CDATA[ tg]]></author>
			</item>
			<item>
				<title>Ehcache sizeof oddity on 64-bit JVMs</title>
				<description><![CDATA[ Hi there,

we are currently experiencing some very weird phenomenon with our usage of a sizeof-based Ehcache, which only manifests on 64-bit JVMs (Oracle/OpenJDK Hotspot 1.6.0). We are using ehcache-spring-annotations to cache the result of a simple method invocation, which returns a list of Hibernate entities:

List<SomeEntity> getSomeEntities();

SomeEntity only has Strings, Classes and other simple types as fields except for a OneToMany relationship to another Hibernate entity, which just contains Strings. We are using Hibernate.initialize to make sure that the OneToMany relationship is initialized before it is getting cached.

Our cache has a global maxBytesLocalHeap set, so a sizeof measurement takes place before caching.

This works well and is fast on a 32-bit JVM, but on a 64-bit JVM the ObjectGraphWalker spends multiple minutes walking the object graph for the List<SomeEntity> and eventually hits the depth limit of 1000.

I am a bit lost trying to figure out what is wrong (a heap dump captured via Visual VM does not seem to contain the objects currently on the stack).

Is sizeof measurement any different between 32 and 64bit?

Thanks,
Thilo

P.S.: Ehcache 2.5.1]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/preList/6746/33943.page#33943</guid>
				<link>http://forums.terracotta.org/forums/posts/preList/6746/33943.page#33943</link>
				<pubDate><![CDATA[Tue, 6 Mar 2012 03:07:25]]> GMT</pubDate>
				<author><![CDATA[ tg]]></author>
			</item>
			<item>
				<title>Re:Why U no fix??</title>
				<description><![CDATA[ Sorry for the impatience, but now that Ehcache 2.5.1 has been tagged, would it be possible to narrow down the Ehcache 2.5.1 release to a more precise date?]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/preList/6521/33159.page#33159</guid>
				<link>http://forums.terracotta.org/forums/posts/preList/6521/33159.page#33159</link>
				<pubDate><![CDATA[Wed, 18 Jan 2012 04:53:54]]> GMT</pubDate>
				<author><![CDATA[ tg]]></author>
			</item>
	</channel>
</rss>