perfsonar-dev - [pS-dev] [GEANT/SA2/ps-java-services] r5717 - in trunk/perfsonar-java-base2: . src/main/java/org/perfsonar/base2/service/messages
Subject: perfsonar development work
List archive
[pS-dev] [GEANT/SA2/ps-java-services] r5717 - in trunk/perfsonar-java-base2: . src/main/java/org/perfsonar/base2/service/messages
Chronological Thread
- From:
- To:
- Subject: [pS-dev] [GEANT/SA2/ps-java-services] r5717 - in trunk/perfsonar-java-base2: . src/main/java/org/perfsonar/base2/service/messages
- Date: Mon, 9 Aug 2010 15:50:54 +0100
Author: psnc.pietrzak
Date: 2010-08-09 15:50:53 +0100 (Mon, 09 Aug 2010)
New Revision: 5717
Modified:
trunk/perfsonar-java-base2/pom.xml
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/messages/GenericMessageHandler.java
Log:
PSSERVICES-517 Bug fix for invalid metadataIdRef attribute rewritting when
handling compound requests and responses.
Modified: trunk/perfsonar-java-base2/pom.xml
===================================================================
--- trunk/perfsonar-java-base2/pom.xml 2010-08-09 14:48:59 UTC (rev 5716)
+++ trunk/perfsonar-java-base2/pom.xml 2010-08-09 14:50:53 UTC (rev 5717)
@@ -8,7 +8,7 @@
<artifactId>ps-mdm-base2</artifactId>
<packaging>jar</packaging>
<name>Perfsonar Base2 package</name>
- <version>1.0.2</version>
+ <version>1.0.3</version>
<description>
The perfSONAR base provides a number of common, shared classes which
can be used by
MA, MP and Clients.
Modified:
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/messages/GenericMessageHandler.java
===================================================================
---
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/messages/GenericMessageHandler.java
2010-08-09 14:48:59 UTC (rev 5716)
+++
trunk/perfsonar-java-base2/src/main/java/org/perfsonar/base2/service/messages/GenericMessageHandler.java
2010-08-09 14:50:53 UTC (rev 5717)
@@ -8,6 +8,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
+import java.util.Hashtable;
import java.util.List;
import java.util.Map;
@@ -221,6 +222,8 @@
protected MessagePair mergeMultipleResponses(ArrayList<MessagePair>
messagePairs) {
+
+ final Map<String, String> ids = new Hashtable<String, String>();
if (messagePairs == null || messagePairs.size() == 0)
return null;
@@ -257,6 +260,8 @@
meta1.setId(newMeta1id);
metaid++;
+
+ ids.put(meta1id, newMeta1id);
/*
* TODO:
@@ -273,6 +278,10 @@
* mapping.add(oldId, newId);
*
*/
+ if (meta1.getSubject().getMetadataIdRef() != null) {
+ if (ids.get(meta1.getSubject().getMetadataIdRef()) !=
null)
+
meta1.getSubject().setMetadataIdRef(ids.get(meta1.getSubject().getMetadataIdRef()));
+ }
//put metadata to new common response message
respMessage.setMetadata(meta1);
- [pS-dev] [GEANT/SA2/ps-java-services] r5717 - in trunk/perfsonar-java-base2: . src/main/java/org/perfsonar/base2/service/messages, svn-noreply, 08/09/2010
Archive powered by MHonArc 2.6.16.