• 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
Do i need to lock getting EODatabaseContext's snapshotForGlobalID() ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Do i need to lock getting EODatabaseContext's snapshotForGlobalID() ?


  • Subject: Do i need to lock getting EODatabaseContext's snapshotForGlobalID() ?
  • From: Peter Vandoros <email@hidden>
  • Date: Tue, 08 Jan 2008 14:09:16 +1100

Hi List,

I need to get to the EODatabaseContext's snapshot for a particular EOGlobalID and was wondering if i needed to do any other locking other than on the EOEditingContext i am passing in to the method below?

public static NSDictionar databaseContextSnapshotForGlobalID(EOEditingContext ec, EOGlobalID globalID) {
EOObjectStoreCoordinator osc = (EOObjectStoreCoordinator) ec.rootObjectStore();
EODatabaseContext dbc = (EODatabaseContext) osc.objectStoreForGlobalID( globalID );
return dbc.snapshotForGlobalID( globalID );
}


I have looked at WOnder's RXEOAccessUtilities.databaseContextForObject() method and found that no locking is done.

I thought that we _always_ need to lock the EOObjectStoreCoordinator and EODatabaseContext even if we have already locked the EOEditingContext because other EOEditingContext's could be accessing the them at the same time on a different Thread. Isn't this correct or is this a special exception to the rule?

Thanks
--
Peter Vandoros
Software Engineer
Etech Group Pty Ltd
Level 3/21 Victoria St
Melbourne VIC 3000
Australia

Ph: +61 3 9639 9677
Fax: +61 3 9639 9577
----------------------------------
IMPORTANT: This e-mail message and any attachments are confidential and may be privileged. If received in error, please reply to this message and destroy all copies and any attachments. You should check this message and any attachments for viruses or defects. Our liability is limited to resupplying any affected message or attachments. For more information about Etech Group, please visit us at http://www.etechgroup.com.au.
_______________________________________________
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: Do i need to lock getting EODatabaseContext's snapshotForGlobalID() ?
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: WO5.4: Generics for objectsWithFetchSpecification ???
  • Next by Date: Re: Do i need to lock getting EODatabaseContext's snapshotForGlobalID() ?
  • Previous by thread: RE-starting up 5.4 wotaskd on 10.5 server (and adding as a host a 5.3 WO)
  • Next by thread: Re: Do i need to lock getting EODatabaseContext's snapshotForGlobalID() ?
  • Index(es):
    • Date
    • Thread