diff --git a/distro/changelog.xml b/distro/changelog.xml index da042a4..6ff6311 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,15 +1,23 @@ + + Fix for Incident #148, Resource Sweeper does not sweep GHN Resources + - Modified xqueries for showing SmartGears and SmarGearsBundle version + Modified xqueries for showing SmartGears and SmarGearsBundle + version Updated label names for the gHN grid columns - Modified xquery to fix bug about wrong scoped generic resource + Modified xquery to fix bug about wrong scoped generic resource + - Modified xquery to get also the hostname info about service endpoints in a given scope - Modified the Resource detail model class to in shared package to support the change explained above + Modified xquery to get also the hostname info about service + endpoints in a given scope + Modified the Resource detail model class to in shared package + to support the change explained above diff --git a/pom.xml b/pom.xml index 5a72e1b..bb7f1a3 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.gcube.portlets.admin rmp-common-library - 2.2.0-SNAPSHOT + 2.2.1-SNAPSHOT Resource Management Library gCube Resource Management Library is a common library containing shared code for Information System Operations diff --git a/src/main/java/org/gcube/resourcemanagement/support/server/managers/resources/GHNManager.java b/src/main/java/org/gcube/resourcemanagement/support/server/managers/resources/GHNManager.java index 0f94d78..afc6002 100644 --- a/src/main/java/org/gcube/resourcemanagement/support/server/managers/resources/GHNManager.java +++ b/src/main/java/org/gcube/resourcemanagement/support/server/managers/resources/GHNManager.java @@ -18,11 +18,9 @@ package org.gcube.resourcemanagement.support.server.managers.resources; import java.io.StringReader; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.Unmarshaller; - import org.gcube.common.resources.gcore.HostingNode; import org.gcube.common.resources.gcore.Resource; +import org.gcube.common.resources.gcore.Resources; import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.impl.ScopeBean; import org.gcube.common.vremanagement.ghnmanager.client.GHNManagerLibrary; @@ -193,10 +191,7 @@ public class GHNManager extends AbstractResourceManager { @Override protected final Resource buildResource(final String xmlRepresentation) throws AbstractResourceException { try { - JAXBContext ctx = JAXBContext.newInstance(HostingNode.class); - Unmarshaller unmarshaller = ctx.createUnmarshaller(); - StringReader reader = new StringReader(xmlRepresentation); - HostingNode deserialised = (HostingNode) unmarshaller.unmarshal(reader); + HostingNode deserialised = Resources.unmarshal(HostingNode.class, new StringReader(xmlRepresentation)); return deserialised; } catch (Exception e) { throw new ResourceAccessException("Cannot load the stub for resource " + this.getType(), e);