• 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: global EO representant / locking on EO?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: global EO representant / locking on EO?


  • Subject: Re: global EO representant / locking on EO?
  • From: Bogdan Zlatanov <email@hidden>
  • Date: Mon, 02 Mar 2015 11:00:03 +0100

This response will not be very helpful, but this sounds like an X-Y problem. Could you elaborate more on what exactly you'd like to achieve?

Cheers, Bogdan

On 02/03/2015 10:39, OC wrote:
Hello there,

is there an object whose _instance_ (not just value like it seems to be with the global ID) would consistently represent one EO, regardless the EC in which the EO just happens to be?

I would need to lock on an EO, but I would need that it worked over all ECs, i.e.

===
synchronized (eo) {
   // no two threads would get there with same EO
   // _not even if the EO is in different ECs_
   // which is why 'synchronized (eo)' does not work
}
===

Of course, I could make a thread-safe map, insert lock objects there and use globalids for index, but it seems to me rather convoluted -- not speaking of that I would not really know when to flush the data (unless I override EOs finalize, ick...)

Isn't there a better solution?

Thanks a lot,
OC


  _______________________________________________
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


References: 
 >global EO representant / locking on EO? (From: OC <email@hidden>)

  • Prev by Date: global EO representant / locking on EO?
  • Next by Date: Re: WOInstaller.jar crashes
  • Previous by thread: global EO representant / locking on EO?
  • Next by thread: Re: global EO representant / locking on EO?
  • Index(es):
    • Date
    • Thread