• 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
Using ERXThreadStorage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using ERXThreadStorage


  • Subject: Using ERXThreadStorage
  • From: Benjamin Steiner <email@hidden>
  • Date: Wed, 16 Dec 2015 10:07:48 +0100

Hi list,

In our application, we keep the business-logic with the EO-model in a separate framework. Because some of the enterprise objects are region-specific, we need to get access to the logged in user(or its region, respectively) with a static method. The problem is that the user is stored in the session, so we can’t access it from the business-framework.

We tried to use ERXThreadStorage, but we only get NULL out of it when we try to get the region. Is there something we overlooked?
Here’s the code we use to store and retrieve the region:

(this happens in the constructor of the session, wenn the user logs in)
ERXThreadStorage.takeValueForKey( region, ERXThreadStorageKeys.CURRENT_REGION );

(this happens on an EO in the business-framework)
Region region = (Region)ERXThreadStorage.valueForKey( ERXThreadStorageKeys.CURRENT_REGION );

Thanks,
Beni
 _______________________________________________
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: Using ERXThreadStorage
      • From: Chuck Hill <email@hidden>
    • Re: Using ERXThreadStorage
      • From: René Bock <email@hidden>
  • Prev by Date: Re: Using multiple servers
  • Next by Date: Re: Using ERXThreadStorage
  • Previous by thread: Help needed!
  • Next by thread: Re: Using ERXThreadStorage
  • Index(es):
    • Date
    • Thread