Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r4117 - in trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist: rest xmlrpc

Subject: perfsonar development work

List archive

perfsonar: r4117 - in trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist: rest xmlrpc


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r4117 - in trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist: rest xmlrpc
  • Date: Thu, 3 Jul 2008 10:19:55 -0400

Author: mac
Date: 2008-07-03 10:19:55 -0400 (Thu, 03 Jul 2008)
New Revision: 4117

Modified:

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/rest/ExistDbHTTPAccess.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
Log:
Several changes.
LSRegistrationComponent fixes. Now it takes interval time in seconds instead
of millis.
LSSummaryServiceComponent: new xqueries, XML RPC supported, some bug fixed
Some other minor changes in other classes

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/rest/ExistDbHTTPAccess.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/rest/ExistDbHTTPAccess.java
2008-07-03 14:19:03 UTC (rev 4116)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/rest/ExistDbHTTPAccess.java
2008-07-03 14:19:55 UTC (rev 4117)
@@ -79,11 +79,15 @@
"<query xmlns=\"http://exist.sourceforge.net/NS/exist\"; "+
"start=\""+String.valueOf(start)+"\" max=\""+
String.valueOf(limit)+"\"> "+
- " <text>" +
+ " <text>" +
"<![CDATA["+
content +
"]]>" +
- "</text> "+
+ " </text> "+
+ " <properties>" +
+ " <property name=\"indent\" value=\"yes\"/>" + //temp
+ " <property name=\"encoding\" value=\"UTF-8\"/>" +
//temp
+ " </properties>" +
"</query>";

return sendPOSTRequest(url, content, username, password);

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java
2008-07-03 14:19:03 UTC (rev 4116)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlDataRepository.java
2008-07-03 14:19:55 UTC (rev 4117)
@@ -138,7 +138,7 @@
public void open() throws PerfSONARException {

logger.debug("ExistDbXmlrpcXmlDataRepository: connect");
-
+
if (existDatabase==null) {

try {
@@ -166,6 +166,12 @@
} catch (XMLDBException e) {
throw new
PerfSONARException("error.common.storage.xmldb.open",
"ExistDbXmlrpcXmlDataRepository: XML DB Exception
"+e.getMessage());
+ } catch (NullPointerException e) {
+ throw new
PerfSONARException("error.common.storage.xmldb.open",
+ "ExistDbXmlrpcXmlDataRepository:
NullPointerException [" +
+ "database="+existDatabase+",
collection="+existCollection+
+ ", driver="+dbDriverClassname+", params: "+dbUri+" :
"+
+ dbUsername+" : "+dbPassword+"] "+e.getMessage());
}

} else {

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
2008-07-03 14:19:03 UTC (rev 4116)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist/xmlrpc/ExistDbXmlrpcXmlStorageManager.java
2008-07-03 14:19:55 UTC (rev 4117)
@@ -138,6 +138,7 @@

try {

+
connect();

XPathQueryService service =
@@ -145,8 +146,12 @@
"XPathQueryService", "1.0");
//service.setProperty("indent", "yes");

+ if (service==null) getLogger().debug("StorageManager: warning -
service is null");

ResourceSet result = service.query(xqueryExpression);
+
+ if (result==null) getLogger().debug("StorageManager: warning -
result is null");
+
ResourceIterator resIt = result.getIterator();
List<Object> list = new Vector<Object>();

@@ -158,12 +163,13 @@
}

String[] xml = new String[list.size()];
+
for (i=0; i < list.size(); i++) {
xml[i] = (String)list.get(i);
}

disconnect();
-
+
//determine return type

if (getResultType() == XmlDbConstants.RETURN_STRING_ARRAY)
@@ -268,7 +274,7 @@
* Connect if required
*/
private void connect() throws PerfSONARException {
-
+
if (!isConnected) {

dataRepository.open();



  • perfsonar: r4117 - in trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/storage/xmldb/exist: rest xmlrpc, svnlog, 07/03/2008

Archive powered by MHonArc 2.6.16.

Top of Page