Hi,

I have an action bean with the @SessionScope annotation. In the ActionBean 
constructor I do few initializations. When I now login to my app it does 3 ajax 
calls to the action bean (almost concurrently). But somehow the constructor is 
called 3 times. But when my frontend calls the methods one after another it 
works. 

Is there a solution to that? 
Is there a better way to initialize some thing once per session?


Here is my Stripes ActionBean

@UrlBinding("/JSONDispatcher")
@SessionScope
public class MainActionBean implements ActionBean {

   private MessageResolver messageResolver;
      initMessageResolver();
   } 

   private void initMessageResolver() {
      // read and parse configuration file
   }
   
  
   public Resolution getMessagList() {
      ...
      return new StreamingResolution("application/json", new 
StringReader(jsonObject.toString()));
   }

    public Resolution getMessageCount() {

      ...

      return new StreamingResolution("application/json", new 
StringReader(jsonObject.toString()));

   }

   public Resolution getFilters() {


      ...


      return new StreamingResolution("application/json", new 
StringReader(jsonObject.toString()));


   }
} 


Best regards
Essey
                                          
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to