perfsonar-dev - perfsonar: r5028 - in branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice: . storage/exist
Subject: perfsonar development work
List archive
perfsonar: r5028 - in branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice: . storage/exist
Chronological Thread
- From:
- To:
- Subject: perfsonar: r5028 - in branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice: . storage/exist
- Date: Thu, 5 Mar 2009 09:06:36 -0500
Author: mac
Date: 2009-03-05 09:06:36 -0500 (Thu, 05 Mar 2009)
New Revision: 5028
Added:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSDeregisterServiceEngine.java
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSGenericRegisterServiceEngine.java
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSKeepaliveServiceEngine.java
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSRegisterServiceEngine.java
Removed:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSGenericRegisterAction.java
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSRegisterAction.java
Modified:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSQueryServiceEngine.java
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/CommonExistDAOImpl.java
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/MultipleFilesExistDAOImpl.java
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/XQueryExistDAOImpl.java
Log:
LS Deregister and LS Keepalive running
Modified:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java
2009-03-05 12:47:18 UTC (rev 5027)
+++
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/GenericLSServiceEngine.java
2009-03-05 14:06:36 UTC (rev 5028)
@@ -13,7 +13,7 @@
public abstract class GenericLSServiceEngine implements ServiceEngine {
- private static final Logger logger =
Logger.getLogger(LSRegisterAction.class.getName());
+ private static final Logger logger =
Logger.getLogger(GenericLSServiceEngine.class.getName());
protected LookupServiceDAO dao;
@@ -79,7 +79,7 @@
</nmwg:key>
*/
- protected String getParameterFromKey(
+ public String getParameterFromKey(
Metadata requestMetadata, String parameterName) {
for (Element key : requestMetadata.getChildren("key")) {
@@ -87,8 +87,8 @@
for (Element params : key.getChildren("parameters")) {
for (Element p : params.getChildren("parameter")) {
String parameterValue = extractParameterValue(p);
- if (parameterName.equals(p.getName())) {
- logger.debug("Found Parameter ["+parameterName+"] in
metadata ["+requestMetadata+"]");
+ if (parameterName.equals(p.getAttribute("name"))) {
+ logger.debug("Found Parameter ["+parameterName+"] in
metadata ["+requestMetadata.getId()+"]");
return parameterValue; //if key has keyId and
}
}
Added:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSDeregisterServiceEngine.java
Deleted:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSGenericRegisterAction.java
Copied:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSGenericRegisterServiceEngine.java
(from rev 4989,
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSGenericRegisterAction.java)
Property changes on:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSGenericRegisterServiceEngine.java
___________________________________________________________________
Name: svn:mergeinfo
+
Added:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSKeepaliveServiceEngine.java
Modified:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSQueryServiceEngine.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSQueryServiceEngine.java
2009-03-05 12:47:18 UTC (rev 5027)
+++
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSQueryServiceEngine.java
2009-03-05 14:06:36 UTC (rev 5028)
@@ -2,7 +2,6 @@
import org.apache.log4j.Logger;
import org.perfsonar.base2.service.exceptions.PerfSONARException;
-import org.perfsonar.base2.service.requesthandler.ServiceEngine;
import org.perfsonar.base2.service.requesthandler.ServiceMessage;
import org.perfsonar.base2.xml.Element;
import org.perfsonar.base2.xml.nmwg.Message;
@@ -16,7 +15,7 @@
*
*/
public class LSQueryServiceEngine
- extends GenericLSServiceEngine implements ServiceEngine {
+ extends GenericLSServiceEngine {
// --------------------------------------------------------------
Constants
Deleted:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSRegisterAction.java
Copied:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSRegisterServiceEngine.java
(from rev 5021,
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSRegisterAction.java)
Property changes on:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/LSRegisterServiceEngine.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/CommonExistDAOImpl.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/CommonExistDAOImpl.java
2009-03-05 12:47:18 UTC (rev 5027)
+++
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/CommonExistDAOImpl.java
2009-03-05 14:06:36 UTC (rev 5028)
@@ -4,7 +4,6 @@
import org.apache.log4j.Logger;
import org.perfsonar.base2.service.configuration.Component;
-import org.perfsonar.base2.service.configuration.Configuration;
import org.perfsonar.base2.service.configuration.ConfigurationManager;
import org.perfsonar.base2.service.exceptions.PerfSONARException;
import org.perfsonar.base2.service.storage.xml.DataCredential;
@@ -13,7 +12,7 @@
import org.perfsonar.base2.service.storage.xml.XMLDataStorage;
import org.perfsonar.base2.service.storage.xml.exist.ExistHTTPDataStorage;
import org.perfsonar.base2.xml.Element;
-import org.perfsonar.service.lookupservice.LSRegisterAction;
+import org.perfsonar.service.lookupservice.LSRegisterServiceEngine;
import org.perfsonar.service.lookupservice.storage.LookupServiceDAO;
/**
* Abstract implementation of LookupServiceDAO
@@ -27,7 +26,7 @@
*/
public abstract class CommonExistDAOImpl extends Component implements
LookupServiceDAO {
- protected static final Logger logger =
Logger.getLogger(LSRegisterAction.class.getName());
+ protected static final Logger logger =
Logger.getLogger(LSRegisterServiceEngine.class.getName());
private XMLDataStorage dataStorage;
private String dataCollection;
Modified:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/MultipleFilesExistDAOImpl.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/MultipleFilesExistDAOImpl.java
2009-03-05 12:47:18 UTC (rev 5027)
+++
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/MultipleFilesExistDAOImpl.java
2009-03-05 14:06:36 UTC (rev 5028)
@@ -16,7 +16,7 @@
* using Multiple files in separate collections: /store and /control
*
* @author Maciej Glowiak
- *
+ * @deprecated
*/
public class MultipleFilesExistDAOImpl extends CommonExistDAOImpl {
Modified:
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/XQueryExistDAOImpl.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/XQueryExistDAOImpl.java
2009-03-05 12:47:18 UTC (rev 5027)
+++
branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice/storage/exist/XQueryExistDAOImpl.java
2009-03-05 14:06:36 UTC (rev 5028)
@@ -19,16 +19,16 @@
//
---------------------------------------------------------------constants
- private static final String UPDATE_FOR = "for $i in ";
+ private static final String UPDATE_FOR = " for $i in ";
- private static final String UPDATE_REMOVE = "return (update delete $i,
'removed')";
+ private static final String UPDATE_REMOVE = " return (update delete $i,
'removed')";
- private static final String UPDATE_INSERT = "update insert ";
+ private static final String UPDATE_INSERT = " update insert ";
private static final String UPDATE_INTO = " into ";
- private static final String UPDATE_LSSTORE =
"/nmwg:store[@type='"
- + LS_STORE_COLLECTION_TYPE + "']";
+ private static final String UPDATE_LSSTORE = "
/nmwg:store[@type='"
+ + LS_STORE_COLLECTION_TYPE + "'] ";
// ------------------------------------------------------instance
variables
@@ -101,13 +101,13 @@
String xquery = XQUERY_DECLARE_NAMESPACES + UPDATE_FOR
+ getRemoveLookupInfoXQueryPart(metadataId) + UPDATE_REMOVE;
-
// remove by xquery
XMLDBResult res = getDataStorage().performXQuery(xquery,
getDataCollection(), getDataCredential());
-
+ logger.debug("REMOVE LOOKUP QUERY:\n"+xquery);
+ logger.debug("REMOVE LOOKUP RESULT:\n"+res);
if (res != null)
- return res.getCount();
+ return res.getTotal();
else
return -1; // if error
- perfsonar: r5028 - in branches/new-structure-with-base2/ps-mdm-ls/src/main/java/org/perfsonar/service/lookupservice: . storage/exist, svnlog, 03/05/2009
Archive powered by MHonArc 2.6.16.