From: Frank S. <fra...@pa...> - 2007-05-02 15:49:57
|
Hi, I have cleaned-up my routine and simplified it a bit to make it more readable. The problem is always the 15th time I call this routine I get: 47735 [Thread-1] DEBUG NSLog - *** EODatabaseContext: access without lock! [2007-05-02 17:41:53 CEST] <Thread-1> java.lang.Exception: This is not a real exception, just a stack trace of the location of the missing lock: at com.webobjects.eoaccess.EODatabaseContext._EOAssertSafeMultiThreadedAcce ss(EODatabaseContext.java:4452) at er.extensions.ERXObjectStoreCoordinatorSynchronizer $ProcessChangesQueue._process (ERXObjectStoreCoordinatorSynchronizer.java:429) at er.extensions.ERXObjectStoreCoordinatorSynchronizer $ProcessChangesQueue.process (ERXObjectStoreCoordinatorSynchronizer.java:450) at er.extensions.ERXObjectStoreCoordinatorSynchronizer $ProcessChangesQueue.run(ERXObjectStoreCoordinatorSynchronizer.java:525) at java.lang.Thread.run(Thread.java:613) Every time it will give one more of this warning.(16th call 1time, 17th call 2 times, 18th 3times.....) What can I do to solve this problem or debug. My properties are: #WOAutoOpenInBrowser=true #WOAutoOpenClientApplication=true WOPort=55555 #WODebuggingEnabled=true #WODirectConnectEnabled=true #WOAllowRapidTurnaround=true #WOSessionTimeOut=3600 WOAllowsConcurrentRequestHandling=true #WOWebServiceTransportName=https er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators=10 #EOAdaptorDebugEnabled=true er.extensions.ERXEC.defaultAutomaticLockUnlock = true er.extensions.ERXApplication.useEditingContextUnlocker = true er.extensions.ERXEC.defaultAutomaticLockUnlock = true er.extensions.ERXEC.useSharedEditingContext=false er.extensions.ERXEC.defaultCoalesceAutoLocks = true The routine is: public void setWebtext_F2 (String webtext, String language, String value, String edited) { ERXEC ec=(ERXEC) ERXEC.newEditingContext(); try{ ec.lock(); EOQualifier aQual; NSMutableArray qbind; Webtext wObject; Language lObject; LanguageWebtext lwObject; if ((null==edited) || (edited.equals(""))) edited = "N"; // Bepaal het webtext-object voor de gegeven webtext try { wObject=(Webtext)EOUtilities.objectMatchingKeyAndValue (ec,"Webtext","webtext",webtext); } catch (Exception e) { wObject=null; } // Bepaal het language-object voor de gegeven language try { lObject=(Language)EOUtilities.objectMatchingKeyAndValue (ec,"Language","language",language); } catch (Exception e) { lObject=null; } // Bepaal het language_webtext-object voor de combinatie van webtext-object en language-object qbind=new NSMutableArray(); qbind.addObject(wObject); qbind.addObject(lObject); aQual = EOQualifier.qualifierWithQualifierFormat("(webtext=%@) and (language=%@)",qbind); EOFetchSpecification fs = new EOFetchSpecification ("LanguageWebtext",aQual,null); NSArray arLanguageWebText = ec.objectsWithFetchSpecification(fs); // In principe mag er maximum 1 resultaat zijn if (arLanguageWebText.count() > 0) { lwObject = (LanguageWebtext)arLanguageWebText.objectAtIndex(0); lwObject.setValue(value); lwObject.setEdited(edited); ec.saveChanges(); } } finally { ec.unlock(); ec.dispose(); } } Thanks, Frank Stock |