It looks like Terracotta is sharing things that aren't intended to be shared. The time zone cache is just a performance optimization for the local JVM. How can you instruct Terracotta not to share this? I have no experience with Terracotta.
The only amount of sharing which was anticipated was serialization of the top-level objects, like DateTime. These objects serialize the minimum amount of data and no runtime state. Put another way, Joda-Time deals with small data objects, and only data is intended to be shared. Is Terracotta trying to share the entire Joda-Time runtime? This does not make sense. Johannes Schneider wrote: > Hi, > > I run into big performance problems regarding Joda and Terracotta (a > clustering solution). > At the moment I don't have any ideas how to solve that. Maybe anybody > has any experiences with Joda and Terracotta? > > I have created a small micro benchmark to test that. It can be found at > the Terracotta forums > (http://forums.terracotta.org/forums/posts/list/0/903.page#5537). > > The main problem is that it seems to be necessary to add the following > fields as root: > > <roots> > <root> > <field-expression>private static final > org.joda.time.DateTimeFieldType > org.joda.time.DateTimeFieldType.*</field-expression> > </root> > </roots> > > If I don't add that root the methods #isAfter() #isBefore #isEquals > don't work as expected. > > And therefore it is necessary to add locking for those methods: > > <autolock auto-synchronized="true"> > <method-expression>* > org.joda.time.tz.CachedDateTimeZone.get*(..)</method-expression> > <lock-level>write</lock-level> > </autolock> > <autolock auto-synchronized="true"> > <method-expression>* > org.joda.time.chrono.BasicChronology.get*(..)</method-expression> > <lock-level>write</lock-level> > </autolock> > > > But locking those methods on the hole cluster results in a major > performance impact when working with Joda objects. > > If anyone can give me any hint or comment, that will be great. At the > moment I am thinking about removing Joda Time completely from the > cluster and only do local calculations with Joda. But that means a lot > of work and I really don't wanna miss Joda time... > > > > Regards, > > Johannes Schneider > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > ------------------------------------------------------------------------ > > _______________________________________________ > Joda-interest mailing list > Joda-interest@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/joda-interest > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Joda-interest mailing list Joda-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/joda-interest