Google Groups Home
Help | Sign in
Message from discussion Transfer objects in session scope and reiniting application
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Bob Silverberg  
View profile
 More options May 10, 10:08 pm
From: "Bob Silverberg" <bob.silverb...@gmail.com>
Date: Sat, 10 May 2008 22:08:25 -0400
Local: Sat, May 10 2008 10:08 pm
Subject: Re: [transfer-dev] Re: Transfer objects in session scope and reiniting application

On Sat, May 10, 2008 at 9:55 PM, Brian Kotek <brian...@gmail.com> wrote:
> I'm trying to figure out a workaround for this, since I do have a User
> object that I want to keep in the session scope. The basic solution of just
> keeping the ID and calling Transfer.get() each time isn't a good choice for
> me, since I have other instance data that is built up and kept in the User
> object that would be lost if the object falls out of cache and
> Transfer.get() actually returns a new instance.

I have the same issue, but I addressed it by creating a CurrentUser
object of my own, which I do store in the session scope.  The
CurrentUser keeps a record of the UserId for the Transfer based User
TO in its instance data and whenever I need something from the
Transfer based User TO I get it via a Transfer.get() inside
CurrentUser.   There may be issues with this design decision, which
I'd be happy to hear about, but it definitely works.

Bob


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google