• 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
Strange localInstanceOfObject behaviour...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange localInstanceOfObject behaviour...


  • Subject: Strange localInstanceOfObject behaviour...
  • From: Kieran Kelleher <email@hidden>
  • Date: Wed, 31 May 2006 16:09:18 -0400

I think I am losing my mind.... 

I have a newly created object in an editing context and I am making a local instance of it in a another editing context ..... however localInstanceOfObject always returns null!! What gives?!

<snip>
    public void setJob( CTJob job ) {
        if ( log.isDebugEnabled() ) log.debug("Setting job from " 
                                              + ( _job == null ? "null" : _job.toLongString() )
                                              + " to " 
                                              + ( job == null ? "null" : job.toLongString() ) );

        

        if ( log.isDebugEnabled() ) log.debug("job.editingContext() = " + WKStringUtilities.toString( job.editingContext() ) );

        

        if ( !job.editingContext().equals( defaultEditingContext() ) ) {
            defaultEditingContext().lock();
            try {
                if ( log.isDebugEnabled() ) log.debug("defaultEditingContext() = " + WKStringUtilities.toString( defaultEditingContext() ) );
                if ( log.isDebugEnabled() ) log.debug("job = " + ( job == null ? "null" : job.toLongString() ) );

                

                _job = (CTJob)EOUtilities.localInstanceOfObject( defaultEditingContext(), job );

                

                if ( log.isDebugEnabled() ) log.debug("Made local copy of job = " + ( _job == null ? "null" : _job.toLongString() ) );
            } finally {
                defaultEditingContext().unlock();
            }
        } else {
            _job = job;
        }
    }
</snip>

gives log output like this:

<snip>
165677 DEBUG [PdX752d1r3lPfb0FXMB9f0kieranWorkerThread5] (JobMessageRelateAndSaveLRTask, setJob, 24) -
Setting job from null to {values = {productionDispatchDate = 2006-06-01 04:00:00 Etc/GMT; inheritanceType = 10; product = "<CTProduct 356844 _EOIntegralKeyGlobalID[CTProduct (java.lang.Integer)1]>"; shipDate = 2006-06-03 04:00:00 Etc/GMT; messages = (); descriptor = "asasdasdasda"; workflowState = "setup"; jobCode = <com.webobjects.foundation.NSKeyValueCoding$Null>; recAddUser = <com.webobjects.foundation.NSKeyValueCoding$Null>; recModUser = <com.webobjects.foundation.NSKeyValueCoding$Null>; recAddTime = <com.webobjects.foundation.NSKeyValueCoding$Null>; recModTime = <com.webobjects.foundation.NSKeyValueCoding$Null>; }; this = "<CTSmartMixJob 5ee1b2 <EOTemporaryGlobalID: 0 0 -64 -88 1 6 0 0 -53 72 1 0 0 0 1 11 -116 8 -112 61 41 -14 -31 105>>"; }

165680 DEBUG [PdX752d1r3lPfb0FXMB9f0kieranWorkerThread5] (JobMessageRelateAndSaveLRTask, setJob, 29) -
job.editingContext() = WKEditingContext@c9ab52

165682 DEBUG [PdX752d1r3lPfb0FXMB9f0kieranWorkerThread5] (JobMessageRelateAndSaveLRTask, setJob, 34) -
defaultEditingContext() = WKEditingContext@6bc09d

165686 DEBUG [PdX752d1r3lPfb0FXMB9f0kieranWorkerThread5] (JobMessageRelateAndSaveLRTask, setJob, 35) -
job = {values = {productionDispatchDate = 2006-06-01 04:00:00 Etc/GMT; inheritanceType = 10; product = "<CTProduct 356844 _EOIntegralKeyGlobalID[CTProduct (java.lang.Integer)1]>"; shipDate = 2006-06-03 04:00:00 Etc/GMT; messages = (); descriptor = "asasdasdasda"; workflowState = "setup"; jobCode = <com.webobjects.foundation.NSKeyValueCoding$Null>; recAddUser = <com.webobjects.foundation.NSKeyValueCoding$Null>; recModUser = <com.webobjects.foundation.NSKeyValueCoding$Null>; recAddTime = <com.webobjects.foundation.NSKeyValueCoding$Null>; recModTime = <com.webobjects.foundation.NSKeyValueCoding$Null>; }; this = "<CTSmartMixJob 5ee1b2 <EOTemporaryGlobalID: 0 0 -64 -88 1 6 0 0 -53 72 1 0 0 0 1 11 -116 8 -112 61 41 -14 -31 105>>"; }

165687 DEBUG [PdX752d1r3lPfb0FXMB9f0kieranWorkerThread5] (JobMessageRelateAndSaveLRTask, setJob, 39) -
Made local copy of job = null
</snip>

I make local instances of new objects in other places with no issues ..... usually 99.9% of problems are of my own doing, but this one is baffling me. Is this a bug introduced in 5.3.1 when they fixed radar 4240473?


-Kieran

________________________________________________________________

Blog: http://webobjects.webhop.org/

Dev Config = OS X 10.4.5 i686-C.Duo / Java 1.4.2_09 /  WO 5.3.1 & P. Wonder / XCode v2.2.1 / MySQL 4.1.18-std / Connector-J 3.0.17

Deploy Config = OS X 10.3.9 Server G4-PPC / Java 1.4.2_09 / WO 5.2.3 / MySQL 4.0.26 / Connector-J 3.0.17





 _______________________________________________
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: Strange localInstanceOfObject behaviour...
      • From: Mark Ritchie <email@hidden>
    • Re: Strange localInstanceOfObject behaviour...
      • From: Mike Schrag <email@hidden>
    • Re: Strange localInstanceOfObject behaviour...
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Xcode java support
  • Next by Date: Re: Servlet WSDL and Session-ed Endpoints
  • Previous by thread: Re: Fast tree scan
  • Next by thread: Re: Strange localInstanceOfObject behaviour...
  • Index(es):
    • Date
    • Thread