I made some changes. Here is what I am using now.
MultiECLockManager.java
Description: Binary data
Chuck On Jul 21, 2009, at 10:46 PM, Cheong Hee (Gmail) wrote:
Could not find isLocked() method in MultiECLockManager. Is it a customized method or my version is older:/* MultiECLockManager.java created by j-rochk...@northwestern.edu on Mon 21-Jul-2003 */methods available are: lock unlock registerEditingContext unregisterEditingContext makeStrongReferences findReference emptyUnregisterQueue sameThreadAssert Cheers Cheong Hee----- Original Message ----- From: "Chuck Hill" <ch...@global-village.net >To: "Cheong Hee (Gmail)" <chn...@gmail.com> Cc: <webobjects-deploy@lists.apple.com> Sent: Tuesday, July 21, 2009 10:04 PM Subject: Re: Inaccurate active session count in JavaMonitor (Solved) On Jul 21, 2009, at 2:44 AM, Cheong Hee (Gmail) wrote:Yeap, exception found.lockManager.unlock() throws IllegalStateException when lock count is zero.Which says to me that it was not locked to begin with. Try if (lockManager.isLocked()) { lockManager.unlock(); }When the lock count is > 1, MultiEC lock manager is happier to unlock all ECs, but not when lock count=0. Try to relate why the lock count=0 is handled by exception. Is it acting like an insurance to alert the users that probably error occur when multi- ECs has registered (and assumed locked), but when no lock is found when called unlock(). Should it or not throwing exception when lock count = 0?The throw is correct. It ensures that your code has balanced calls to lock and unlock.Great thanks, Chuck and it clears doubt on my bad coding.You are welcome. Chuck -- Chuck Hill Senior Consultant / VP Development Learn WO at WOWODC'09 East in Montréal this August! http://www.wocommunity.org/wowodc09/east http://arstechnica.com/apple/news/2009/07/webobjects-sliced-from-106but-prognosis-of-death-premature.ars
-- Chuck Hill Senior Consultant / VP Development Learn WO at WOWODC'09 East in Montréal this August! http://www.wocommunity.org/wowodc09/east http://arstechnica.com/apple/news/2009/07/webobjects-sliced-from-106but-prognosis-of-death-premature.ars
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-deploy mailing list (Webobjects-deploy@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-deploy/archive%40mail-archive.com This email sent to arch...@mail-archive.com