tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship" <hls...@attbi.com>
Subject RE: Another problem due to changes PageRecorder in 2.4 version
Date Thu, 20 Feb 2003 14:18:11 GMT
Through 2.3, everything was serialized in the same graph.  This is changed
in 2.4 where the engine and the visit are serialized together and each
persistent page property is stored under its own HttpSession key.

This makes more sense from an efficiency standpoint.  The engine & visit get
(re-)stored into the HttpSession every request cycle so it's very good to
keep them as small as possible.  Persistent page properties change
relatively rarely, storing them individually is, again, more efficient.  Of
course, this efficiency is only meaningful in a clustered environment, where
HttpSession.setAttribute() results in the value being serialized and IPC'ed
to other servers.

In addition, using many small keys makes it much, much easier to see (in the
RequestContext dump) what persistent state has been stored without using the
Inspector.  I consider this a big plus!

In terms of Cayenne, storing the DataContext in the Visit, and storing just
object ids (not objects) as persistent properties may be the way to go.
When I get around to creating some Cayanne apps, I'll probably do this, and
create some kind of helper bean to help with the translation between
properties and objects.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: Peter Levart [mailto:Peter.Levart@select-tech.si] 
> Sent: Thursday, February 20, 2003 3:24 AM
> To: Tapestry development; David Solis
> Cc: cayenne-user@objectstyle.org
> Subject: Re: Another problem due to changes PageRecorder in 
> 2.4 version
> 
> 
> On sreda 19 februar 2003 08:17 pop., David Solis wrote:
> >
> > According to Cayenne developers DataConext must be transient: 
> > "Serialization works the other way around in Cayenne - DataContext 
> > serializes and deserializes its objects. Making context transient 
> > allows to avoid double serialization (Craig Miskell, who 
> implemented 
> > this code may, correct me if I am wrong). So if Visit's 
> DataContext is 
> > serialized, all objects should be restored properly (see 
> > DataContext.readObject())."
> >
> > The fact is: I can't use Tapestry 2.4 with Cayenne as the 
> same way as 
> > with Tapestry 2.3.
> >
> >
> > Any ideas?
> >
> 
> I havent looked at code yet, but it seems that the Visit 
> object is not 
> serialized together with persistent properties in the same 
> object graph. Only 
> if it was, de-serialization could guarantee that you will get 
> the same 
> instance of an object at several places in the graph.
> 
> This is not specific to Cayenne. Anyone that keeps the same 
> reference to some 
> object in both Visit and in persistent propery could be 
> affected. I think 
> Tapestry should guarantee that all persistent (session) state 
> be serialized 
> together in the same graph.
> 
> Peter
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 


Mime
View raw message