Fix for Incident #148, Resource Sweeper does not sweep GHN Resources

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/rmp-common-library@114880 82a268e6-3cf1-43bd-a215-b396298e98cf
Feature/25384
Massimiliano Assante 9 years ago
parent 44f943a78a
commit e28d66f6db

@ -1,15 +1,23 @@
<ReleaseNotes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="xsd/changelog.xsd">
<Changeset component="org.gcube.resourcemanagement.support.2-2-1"
date="2014-05-25">
<Change>Fix for Incident #148, Resource Sweeper does not sweep GHN Resources</Change>
</Changeset>
<Changeset component="org.gcube.resourcemanagement.support.2-2-0"
date="2014-12-09">
<Change>Modified xqueries for showing SmartGears and SmarGearsBundle version</Change>
<Change>Modified xqueries for showing SmartGears and SmarGearsBundle
version</Change>
<Change>Updated label names for the gHN grid columns</Change>
<Change>Modified xquery to fix bug about wrong scoped generic resource</Change>
<Change>Modified xquery to fix bug about wrong scoped generic resource
</Change>
</Changeset>
<Changeset component="org.gcube.resourcemanagement.support.2-1-0"
date="2014-12-09">
<Change>Modified xquery to get also the hostname info about service endpoints in a given scope</Change>
<Change>Modified the Resource detail model class to in shared package to support the change explained above</Change>
<Change>Modified xquery to get also the hostname info about service
endpoints in a given scope</Change>
<Change>Modified the Resource detail model class to in shared package
to support the change explained above</Change>
</Changeset>
<Changeset component="org.gcube.resourcemanagement.support.2-0-0"
date="2013-10-21">

@ -11,7 +11,7 @@
<groupId>org.gcube.portlets.admin</groupId>
<artifactId>rmp-common-library</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>2.2.1-SNAPSHOT</version>
<name>Resource Management Library</name>
<description>
gCube Resource Management Library is a common library containing shared code for Information System Operations

@ -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);

Loading…
Cancel
Save