[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-user
Subject:    Re: Adding Global POJO in S2 Environment
From:       Wes Wannemacher <wesw () wantii ! com>
Date:       2008-04-30 1:21:12
Message-ID: 1209518472.5817.12.camel () wesw-laptop
[Download RAW message or body]


On Wed, 2008-04-30 at 08:01 +0700, Frans Thamura wrote:
> On Wed, Apr 30, 2008 at 7:51 AM, Wes Wannemacher <wesw@wantii.com> wrote:
> 
> > Do you want one static copy of your POJO available everywhere, or do you
> > need a unique copy of your POJO for each request or session?
> >
> 
> i want this pojo available  in my context (only inside current .war).
> 
> i have a generic action support implementation, i use spring, and the aware
> is implement persistance aware
> 
> do i have to implement another persistance aware, and this aware connect to
> the spring + resourcebundle that i want to be injected as global variable
> 
> f

Frans,

This really doesn't answer my question... What I am asking is this - If
I make a POJO -

public class WanTii {
  private String username;
  ...
  getters/setters
}

And, when my app starts up, I create a copy of this POJO and set
username to "wesw." Then assuming this POJO is injected in all actions
(even for other users) getUsername() calls will return "wesw." 

Or, do you want a unique copy of the POJO so that each user will see
their own username?

-Wes


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic