• 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: ERXEC (and WCEC also) lockCount() method is missing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERXEC (and WCEC also) lockCount() method is missing


  • Subject: Re: ERXEC (and WCEC also) lockCount() method is missing
  • From: Chuck Hill <email@hidden>
  • Date: Sat, 25 Jan 2014 01:27:27 +0000
  • Thread-topic: ERXEC (and WCEC also) lockCount() method is missing

You would have to make your own ERXEC subclass, override the lock() and unlock() methods, and add a factory that created this EXEC subclass.  

Or change that code to create and lock a new ERXEC instance and localInstance the relevant objects into it.  I have no idea if that would cause any other functional changes in that app.  It is possible.


Chuck


-- 
Chuck Hill             
Executive Managing Partner, VP Development and Technical Services

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C! 

Global Village Consulting ranks 44th in 25th annual PROFIT 500 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!

On 1/21/2014, 7:17 AM, "Filippo Laurìa" wrote:

I, really, don't know.. i'm trying to upgrade Web-CAT's frameworks to
latest versions, but it seem to be too hard.

Anyway, any suggestion on how to rewrite that piece of code?


2014/1/17 Chuck Hill <email@hidden>:
Why is it doing that?  That seems… like not a good idea.

Chuck


On 1/17/2014, 5:06 AM, "Filippo Laurìa" wrote:

Hi everyone,
i've this piece of code:

// snipped start
static void waitForNextJob(QueueDescriptor descriptor) {
     TokenDispenser dispenser = dispenserFor(descriptor);
     int lockCount = 0;
     try {
         if (descriptor.editingContext() instanceof ERXEC) {
             ERXEC ec = (ERXEC) descriptor.editingContext();
             while (ec.lockCount() > 0) {
                 ec.unlock();
                 lockCount++;
             }
         }
         dispenser.getJobToken();
     } finally {
         while (lockCount > 0) {
             descriptor.editingContext().lock();
             lockCount--;
         }
     }
}
// snippet end

In it, as you can see, is used method lockCount() from class ERXEC
(project wonder 2.0?).
I'm trying to build using project wonder 6.0.
Considering that the method lockCount() is missing in project wonder
6.0
(http://jenkins.wocommunity.org/job/Wonder/javadoc/er/extensions/eof/ERXEC.html),
how can i obtain the same behavior?

Thank you.

--
Filìppo Laurìa

_______________________________________________
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



--
Filìppo Laurìa - http://www.facebook.com/filippo.lauria

 _______________________________________________
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: 
 >ERXEC (and WCEC also) lockCount() method is missing (From: Filippo Laurìa <email@hidden>)
 >Re: ERXEC (and WCEC also) lockCount() method is missing (From: Chuck Hill <email@hidden>)
 >Re: ERXEC (and WCEC also) lockCount() method is missing (From: Filippo Laurìa <email@hidden>)

  • Prev by Date: Re: Would u still recommend implementing basic auth like in REST presentation WOWODC '11?
  • Next by Date: ERJQueryMobile - Switch to jqm 1.4
  • Previous by thread: Re: ERXEC (and WCEC also) lockCount() method is missing
  • Next by thread: Ajax not working in deployment
  • Index(es):
    • Date
    • Thread