• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Session object in concurrent threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Session object in concurrent threads


  • Subject: Session object in concurrent threads
  • From: Joe Kramer <email@hidden>
  • Date: Mon, 7 Dec 2009 13:39:16 -0800

Hi List,

I was hoping someone could give me some pointers on how to access a session from concurrent threads.  I am very new to concurrency, so please forgive me for being naive.  I have a thread that runs some shell scripts and I wanted the user to still have a responsive UI while the processing is happening in the background.  But in the processing I need access to the session object.  I'm wondering the best way to accomplish this.  We are using GVC frameworks, so currently I have this in my Thread subclass:

protected WOSession session() {

     return (WOSession) WOSession.session();

}


This seems to work in my ideal, single session development environment, but I'm afraid this isn't the best solution.  I know this can cause problems because I get this in my log:


ERXThreadStorage - The object for key 'session' was inherited from the parent thread. The usage of inherited objects that are a subclass of 'WOSession' can cause problems.
java.lang.Exception: DEBUG
        at er.extensions.foundation.ERXThreadStorage.valueForKey(ERXThreadStorage.java:162)
        at net.global_village.woextensions.WOSession.session(WOSession.java:80)
        <snip>
Any help on this would be greatly appreciated.


Regards,


Joe Kramer
CyberApps, Inc.
email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Session object in concurrent threads
      • From: Guido Neitzer <email@hidden>
  • Prev by Date: Re: Frames and AjaxUpdateContainer
  • Next by Date: Re: All In One Installer broken
  • Previous by thread: Re: Frames and AjaxUpdateContainer
  • Next by thread: Re: Session object in concurrent threads
  • Index(es):
    • Date
    • Thread