Hi All,
I have been working for 2 days on this. Readed 'Managing the Object Grapth' again. But I don't understand this. I have 3 instances running with this application. I have a second application that randomly fetch, insert/update and delete one row choosing one of the instances. (I use SOAP-calls)
This is my routine with the locking:
public void deleteWebtextValue (String webtext, String language) { //NSLog.allowDebugLoggingForGroups(NSLog.DebugGroupSQLGeneration); //NSLog.allowDebugLoggingForGroups(NSLog.DebugGroupDatabaseAccess); //NSLog.setAllowedDebugLevel(NSLog.DebugLevelInformational); EOEditingContext ec = new EOEditingContext(); try { ec.lock(); EOQualifier aQual; NSMutableArray qbind; EOFetchSpecification fs;
LanguageWebtext lwObject; // Bepaal het user_userparameter-object voor de gegeven waarden qbind=new NSMutableArray(); qbind.addObject(webtext); qbind.addObject(language); aQual = EOQualifier.qualifierWithQualifierFormat("(webtext.webtext=%@) and (language.language=%@)",qbind); fs = new EOFetchSpecification("LanguageWebtext",aQual,null); NSArray arLanguageWebtext = ec.objectsWithFetchSpecification(fs); int iLW = arLanguageWebtext.count(); for (int i=0;i<iLW;i++) { lwObject = (LanguageWebtext)arLanguageWebtext.objectAtIndex(i); ec.deleteObject(lwObject); } ec.saveChanges(); } finally { ec.unlock(); ec.dispose(); } }
How can I controle why WO uses sometimes an Update where there should be Delete. Is there some locking to see on the side of the database? Is there a way I can contole this?
Thanks for tips because I don't get it. Also sometimes one of the instances freezes, but that only happens rare. (Perhaps deadlocking?)
Frank Stock |