|
From: Steven D. <ste...@gm...> - 2005-02-22 14:38:21
|
Hi folks, Sorry to bring this back up again. What are your thoughts on defining in the transaction demarcation whether sessions need to be kept open for the benefit of rendering the view? I can imagine that for some calls through the tx layer there's not need to keep those sessions open. This would allow users to tweak the OSIV pattern to there own needs. Steven On Mon, 21 Feb 2005 11:54:28 +0100, Steven Devijver <ste...@gm...> wrote: > A possible solution could be to define in the transaction demarcation > setup if sessions need to kept open until the end of the request. > > > On Mon, 21 Feb 2005 09:28:41 +0100, Per Olesen <po...@no...> wrote: > > > > > > > > Yes, that's exactly how it would work, if you did indeed call down into > > > the tx wrapped service layer multiple times. Of course, it's usually not > > > appropriate to combine data from multiple transactions anyway, but one > > > common case of this is where you call down to get the form backing > > > object contents, and then later call down again with the modified > > > object. The deferred close strategy blows up in this scenario. One > > > workaround which Spring MVC makes pretty easy is to keep your form > > > backing object in the session session, from the previous get. Then you > > > end up only doing one call down into tx layer to apply changes. But > > > this _is_ a limitation, of course. > > > > > > > Hmm yeah, we did think about that too. Actually, we thought about it before > > deciding to use OpenSessionInView pattern, as using this pattern is exactly > > about accepting multiple calls into the tx layer to get more easy view > > development. > > > > This is also why I cannot see how the deferred close option will be an option > > for anyone to solve this problem, cause all using OpenSessionInView will have > > multiple calls from their view to back forms. This is one of the central > > ideas of using OpenSessionInView. > > > > Regards, Per > > > > > > ------------------------------------------------------- > > SF email is sponsored by - The IT Product Guide > > Read honest & candid reviews on hundreds of IT Products from real users. > > Discover which products truly live up to the hype. Start reading now. > > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > |