perfsonar-dev - perfsonar: r5331 - branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist
Subject: perfsonar development work
List archive
perfsonar: r5331 - branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist
Chronological Thread
- From:
- To:
- Subject: perfsonar: r5331 - branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist
- Date: Fri, 30 Oct 2009 04:02:25 -0400
Author: trzaszcz
Date: 2009-10-30 04:02:25 -0400 (Fri, 30 Oct 2009)
New Revision: 5331
Modified:
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist/ExistHTTPDataStorage.java
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist/HTTPAccess.java
Log:
removed synchronization on sendXQueryPostRequest method
Modified:
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist/ExistHTTPDataStorage.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist/ExistHTTPDataStorage.java
2009-10-29 12:28:10 UTC (rev 5330)
+++
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist/ExistHTTPDataStorage.java
2009-10-30 08:02:25 UTC (rev 5331)
@@ -57,9 +57,8 @@
}
- public synchronized XMLDBResult performXQuery(String xquery, String
collection,
+ public XMLDBResult performXQuery(String xquery, String collection,
DataCredential credential) throws PerfSONARException {
-
XMLDBResult results = null;
try {
@@ -87,7 +86,6 @@
+ ex.getMessage());
}
-
return results;
}
Modified:
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist/HTTPAccess.java
===================================================================
---
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist/HTTPAccess.java
2009-10-29 12:28:10 UTC (rev 5330)
+++
branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist/HTTPAccess.java
2009-10-30 08:02:25 UTC (rev 5331)
@@ -23,9 +23,7 @@
// --------------------------------------------- Private variables
- protected HttpURLConnection httpUrlConnection;
-
// -------------------------------------------------- Constructors
// ------------------------------------------------ Public methods
@@ -142,7 +140,7 @@
* @return
* @throws IOException
*/
- protected HTTPResult sendHTTPRequest(
+ private HTTPResult sendHTTPRequest(
String url,
String method,
String contentType,
@@ -152,14 +150,12 @@
String username,
String password) throws IOException {
- //temp//
- boolean debug=false;
//connect by HTTP with /exist/rest/db/COLLECTION
URL _url = new URL(url);
//create HTTP URL Connection
- httpUrlConnection = (HttpURLConnection) _url.openConnection();
+ HttpURLConnection httpUrlConnection = (HttpURLConnection)
_url.openConnection();
//set HTTP method
httpUrlConnection.setRequestMethod(method);
@@ -183,8 +179,6 @@
if (password==null) password=""; //if null make it empty String
if (!("".equals(username))) {
- if (debug) System.out.println("[D] authorization Basic "+
- username+":"+password);
//encode BASE 64
String userAndPass = username+":"+password;
@@ -206,12 +200,12 @@
OutputStream out = httpUrlConnection.getOutputStream();
out.write(content.getBytes());
out.flush();
+// out.close();
}
//HTTP response available now
int responseCode = httpUrlConnection.getResponseCode();
String responseMessage = httpUrlConnection.getResponseMessage();
- if (debug) System.out.println("[D] Response code: "+ responseCode+"
("+responseMessage+")");
InputStream response = null;
if (isResponse) {
@@ -219,16 +213,9 @@
}
return new HTTPResult(response, responseCode, responseMessage);
- //return new HTTPResult(response, responseCode);
-
}
- public void disconnectHTTPServer() {
-
- httpUrlConnection.disconnect();
-
- }
} //HTTPAccess
- perfsonar: r5331 - branches/new-structure-with-base2/ps-mdm-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist, svnlog, 10/30/2009
Archive powered by MHonArc 2.6.16.