If my heapdump Dominator Tree view looks like below, can I assume the major contributor (~1GB) to my heap is the Thread instance created by Weblogic? And in that Thread a reference to ByteArrayOutputStream is the reason for 1GB?
Follow up question: Can I also assume it is due to object serialization? Maybe triggered by Terracotta ehcahce (from the third line. Not because it is next to the ByeArrayOS, because in our code that is the only place serialization can happen)?
Ehcache does indeed rely on Java Serialization the moment your cache goes beyond heap.
However, it will only ever serialize what you put in the cache. So is it possible that some cached mappings have such huge value or even key?