Dear Wiki user, You have subscribed to a wiki page or wiki category on "Jakarta-tapestry Wiki" for change notification.
The following page has been changed by FilipBalas: http://wiki.apache.org/jakarta-tapestry/CayenneTapestrySqueezer ------------------------------------------------------------------------------ ##language:en == How To Get Cayenne to Work with Tapestry DataSqueezer == - To fully benefit from the information below you should be familiar with the workings of the DataSqueezer and [http://www.objectstyle.org/cayenne/ Cayenne]. The key concept to remember during this explanation is that there must be ONE unique Datacontext for each users session in the Tapestry webapp. Now if you are not using the DataSqueezer, it suffices to simply put the Datacontext into your VisitObject. This results in a unique Datacontext for each users session. However there is an additional hurdle when using Tapestry's DataSqueezer to serialize and de-serialize Cayenne Dataobjects. The difficulty is that the ISqueezeAdaptor interface does not provide a mechanism for accessing the ?VisitObject, hence no access to the Datacontext, hence no way to de-serialize your objects. + To fully benefit from the information below you should be familiar with the workings of the DataSqueezer and [http://www.objectstyle.org/cayenne/ Cayenne]. The key concept to remember during this explanation is that there must be ONE unique Datacontext for each users session in the Tapestry webapp. Now if you are not using the DataSqueezer, it suffices to simply put the Datacontext into your VisitObject. This results in a unique Datacontext for each users session. However there is an additional hurdle when using Tapestry's DataSqueezer to serialize and de-serialize Cayenne Dataobjects. The difficulty is that the ISqueezeAdaptor interface does not provide a mechanism for accessing the VisitObject, hence no access to the Datacontext, hence no way to de-serialize your objects. The solution comes from the use of the ThreadLocal object. By creating a reference to a ThreadLocal object you can gain global access to the VisitObject which solves the problem listed above. Since code is worth a thousand words, we will take a step by step journey to getting Cayenne to work with the DataSqueezer. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]