Skip to Content.
Sympa Menu

perfsonar-dev - r1804 - trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType

Subject: perfsonar development work

List archive

r1804 - trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType


Chronological Thread 
  • From:
  • To:
  • Subject: r1804 - trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType
  • Date: Thu, 7 Dec 2006 05:29:26 -0500

Author: mac
Date: 2006-12-07 05:29:25 -0500 (Thu, 07 Dec 2006)
New Revision: 1804

Modified:

trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSGenericRegisterAction.java

trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSRegisterAction.java
Log:
Bug reported by Michael Michalis was fixed.
When update action changes accessPoint, control information is modified now.

Modified:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSGenericRegisterAction.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSGenericRegisterAction.java
2006-12-07 08:54:42 UTC (rev 1803)
+++
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSGenericRegisterAction.java
2006-12-07 10:29:25 UTC (rev 1804)
@@ -273,8 +273,6 @@
String query =
"declare namespace
nmwg=\"http://ggf.org/ns/nmwg/base/2.0/\";; " +

"data(/nmwg:store[@type='"+LS_STORE_COLLECTION_TYPE+"']/nmwg:metadata[@id='"+key+"']/@id)";

-
-
XmlDbResult res = (XmlDbResult)xmlStorageManager.fetch(query);

int resnum = res.getCount();

Modified:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSRegisterAction.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSRegisterAction.java
2006-12-07 08:54:42 UTC (rev 1803)
+++
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/LSRegisterAction.java
2006-12-07 10:29:25 UTC (rev 1804)
@@ -135,6 +135,7 @@
//remove key element from metadata
requestMetadata.setKey(null);

+
}

// check keyValue again, it may be accessPoint now
@@ -189,7 +190,15 @@
+keyValue+"']\" />\n" +
"<xu:remove
select=\"/nmwg:store[@type='"+LS_STORE_COLLECTION_TYPE+"']/nmwg:data[@metadataIdRef='"
+keyValue+"']\" />\n";
-
+
+ //if update key, keyvalue contains old key, accessPoint new
one
+ //but we must delete also old control information

+ if (!keyValue.equals(accessPoint)) {
+ logger.debug("LSRegisterAction: remove control
information for old key (DB key was changed)");
+ removeUpdate=removeUpdate+
+ "<xu:remove
select=\"/nmwg:store[@type='"+LS_STORE_CONTROL_COLLECTION_TYPE+"']/nmwg:metadata[@id='"
+ +keyValue+"']\" />\n";
+ }

} else {

@@ -278,7 +287,7 @@


//update control time - last modification
- updateTime(keyValue, xmlStorageManager); //TODO: change
xmlStorageManager to LSstorage-control
+ updateTime(accessPoint /*keyValue*/, xmlStorageManager); //TODO:
change xmlStorageManager to LSstorage-control

//return Key
// xpath:////nmwg:metadata/nmwg:key/



  • r1804 - trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType, svnlog, 12/07/2006

Archive powered by MHonArc 2.6.16.

Top of Page