Fixed unPublishing of service

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/vre-management/smart-executor@111723 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2015-02-05 11:55:40 +00:00
parent 8cf79eb43d
commit 72645c9586
1 changed files with 5 additions and 0 deletions

View File

@ -125,6 +125,11 @@ public class ExecutorImpl implements Executor {
* resource has not be published
*/
private static void unPublishScopedResource(Resource resource) throws RegistryNotFoundException, Exception {
if(ExecutorImpl.ctx == null){
logger.debug("The ServiceEnpoint has been never published. So no needs to unpublish it.");
return;
}
StringWriter stringWriter = new StringWriter();
Resources.marshal(resource, stringWriter);