• 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: locking problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: locking problem


  • Subject: Re: locking problem
  • From: Nathan Dumar <email@hidden>
  • Date: Sun, 19 Dec 2004 11:28:46 -0500


On Dec 18, 2004, at 7:30 PM, Nathan Dumar wrote:

So ... is reset() my magic bullet? Or unlock-unregister-dispose? Or something else?

To answer my own question here, after testing on my dev machine, reset() causes some strange error if I try to use the EC again (even if I also do ec = new EOEditingContext before using it). See end of message for the error, for the morbidly curious.


Unlock-unregister-dispose might have also worked, if I was only doing it once when moving on to another page, but I also need to dispose and re-create the EC while in the same page. Registering this new context works, but then finishing the RR loop gets an error that I'm unlocking with a different thread than I locked with. Makes sense.

So I'm thinking that because I want to do so much disposing, I probably won't be able to use the MultiECLockManager tool. I'll have to go through and do all the locks and unlocks by hand, around every single instance of database access. (Which is safer and more efficient in the long run, right?) ... What about when a relationship is followed and another fetch is made? How can I lock around that? or is that unnecessary?

Thanks,
Nathan


Here's the strange error that using a reset() EC causes:

java.lang.NullPointerException

EOQualifierSQLGeneration.java
418
schemaBasedQualifierWithRootEntity
com.webobjects.eoaccess

EOQualifierSQLGeneration.java
165
_schemaBasedQualifierWithRootEntity
com.webobjects.eoaccess

EOQualifierSQLGeneration.java
502
schemaBasedQualifierWithRootEntity
com.webobjects.eoaccess

EOQualifierSQLGeneration.java
165
_schemaBasedQualifierWithRootEntity
com.webobjects.eoaccess

EODatabaseChannel.java
210
selectObjectsWithFetchSpecification
com.webobjects.eoaccess

EODatabaseContext.java
3178
_objectsWithFetchSpecificationEditingContext
com.webobjects.eoaccess

EODatabaseContext.java
3319
objectsWithFetchSpecification
com.webobjects.eoaccess

EOObjectStoreCoordinator.java
535
objectsWithFetchSpecification
com.webobjects.eocontrol

EOEditingContext.java
4036
objectsWithFetchSpecification
com.webobjects.eocontrol

EOEditingContext.java
4421
objectsWithFetchSpecification
com.webobjects.eocontrol

EOUtilities.java
193
objectsMatchingValues
com.webobjects.eoaccess

EOUtilities.java
321
objectMatchingValues
com.webobjects.eoaccess

Locate.java
85
findExact
Locate

Locate.java
55
findBy
Locate

_______________________________________________
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: locking problem
      • From: Ben Trumbull <email@hidden>
References: 
 >locking problem (From: Nathan Dumar <email@hidden>)
 >Re: locking problem (From: Ben Trumbull <email@hidden>)
 >Re: locking problem (From: Nathan Dumar <email@hidden>)

  • Prev by Date: Re: locking problem
  • Next by Date: Setting the statuscode for the response in a directAction
  • Previous by thread: Re: locking problem
  • Next by thread: Re: locking problem
  • Index(es):
    • Date
    • Thread