• 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
Re: Quick ERXEnterpriseObject newly inserted Question --
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quick ERXEnterpriseObject newly inserted Question --


  • Subject: Re: Quick ERXEnterpriseObject newly inserted Question --
  • From: David Holt <email@hidden>
  • Date: Tue, 14 Dec 2010 14:15:39 -0800

Hi Anjo,

On 2010-12-14, at 1:34 PM, Anjo Krank wrote:

> There is a reason why stuff in BT is done as it is.
>
> I.e. there is a People.class.setCurrentUser(People user) and People.class.currentUser(EOEditingContext ec). Basically it puts all the thread storage code (including the key) in People, which is, like, good style?

Absolutely agree. But it was difficult for me to wrap my head around ERXThreadStorage AND Clazz pattern AND ERCoreBusinessLogic at the same time. I was just trying to simplify it a little for Jesse. There is no question that all three together are much more powerful and useful.

>
> Also, ERXThreadStorage already handles EOs and faulting.


Thanks,

David

>
> Cheers, Anjo
>
>
>
> Am 14.12.2010 um 21:57 schrieb David Holt:
>
>> 	public static Person currentUser(EOEditingContext ec) {
>> 		Person currentUser = currentUser();
>> 		if (currentUser != null && currentUser.editingContext() != ec) {
>> 			EOEditingContext currentUserEc = currentUser.editingContext();
>> 			currentUserEc.lock();
>> 			try {
>> 				Person localUser = (Person) ERXEOControlUtilities
>> 						.localInstanceOfObject(ec, currentUser);
>> 				currentUser = localUser;
>> 			} finally {
>> 				currentUserEc.unlock();
>> 			}
>> 		}
>> 		return currentUser;
>> 	}
>>
>
> _______________________________________________
> 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

 _______________________________________________
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: Quick ERXEnterpriseObject newly inserted Question --
      • From: Anjo Krank <email@hidden>
    • Re: Quick ERXEnterpriseObject newly inserted Question --
      • From: "Ricardo J. Parada" <email@hidden>
References: 
 >Quick ERXEnterpriseObject newly inserted Question -- (From: Jesse Tayler <email@hidden>)
 >Re: Quick ERXEnterpriseObject newly inserted Question -- (From: Ramsey Gurley <email@hidden>)
 >Re: Quick ERXEnterpriseObject newly inserted Question -- (From: Jesse Tayler <email@hidden>)
 >Re: Quick ERXEnterpriseObject newly inserted Question -- (From: David Holt <email@hidden>)
 >Re: Quick ERXEnterpriseObject newly inserted Question -- (From: Anjo Krank <email@hidden>)

  • Prev by Date: Re: Quick ERXEnterpriseObject newly inserted Question --
  • Next by Date: Re: Quick ERXEnterpriseObject newly inserted Question --
  • Previous by thread: Re: Quick ERXEnterpriseObject newly inserted Question --
  • Next by thread: Re: Quick ERXEnterpriseObject newly inserted Question --
  • Index(es):
    • Date
    • Thread