From 3782a2809274528064b0c10dfc723665a905d56e Mon Sep 17 00:00:00 2001 From: Lucio Lelii Date: Wed, 14 Jan 2009 19:29:04 +0000 Subject: [PATCH] git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vre-management/VREModeler@8402 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../vremodeler/impl/thread/DeployVRE.java | 17 +++++++++-------- .../vremodeler/test/ModelerTest.java | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/org/gcube/vremanagement/vremodeler/impl/thread/DeployVRE.java b/src/org/gcube/vremanagement/vremodeler/impl/thread/DeployVRE.java index 80119b9..672b20a 100644 --- a/src/org/gcube/vremanagement/vremodeler/impl/thread/DeployVRE.java +++ b/src/org/gcube/vremanagement/vremodeler/impl/thread/DeployVRE.java @@ -43,8 +43,7 @@ import org.xml.sax.SAXException; public class DeployVRE extends Thread{ private static GCUBELog logger= new GCUBELog(DeployVRE.class); - private ISPublisher publisher; - + private ModelerResource wsResource= null; private String resourceId; private GCUBEScope startingScope; @@ -120,9 +119,9 @@ public class DeployVRE extends Thread{ report=mbportType.getReport(reportId); attempt++; getResource().setReportFirstStep(report); - /*System.out.println("---------"); + System.out.println("---step 1------"); System.out.println(report); - System.out.println("---------");*/ + System.out.println("---------"); }while (!isDeploymentStatusFinished(report) && attempt<10); }catch(Exception e){e.printStackTrace(); throw e;} return ""; @@ -154,10 +153,8 @@ public class DeployVRE extends Thread{ throws Exception { OptionsParameters ops; - ResultSet resGenericInfo = DBInterface.queryDB("select VRE.name from VRE where VRE.id='"+this.getParameter()+"'; "); - if (!resGenericInfo.next()) { - throw new GCUBEFault("The VRE with ID "+this.getParameter()+" cannot be retrieved on the DB"); - } + + ResultSet resGenericInfo = DBInterface.queryDB("select VRE.name, VRE.vredesigner, VRE.vremanager, VRE.IntervalTo, VRE.IntervalFrom, VRE.description from VRE where VRE.id='"+this.getParameter()+"'; "); if (!resGenericInfo.next()) throw new GCUBEFault("The VRE with ID "+this.getParameter()+" cannot be retrieved"); ops=new OptionsParameters(); @@ -263,8 +260,12 @@ public class DeployVRE extends Thread{ do{ this.wait(20000); report=vreManPortType.getReport(reportId); + System.out.println("---step 2------"); + System.out.println(report); + System.out.println("---------"); attempt++; getResource().setReportSecondStep(report); + }while (!isDeploymentStatusFinished(report) && attempt<20); return ""; } diff --git a/src/org/gcube/vremanagement/vremodeler/test/ModelerTest.java b/src/org/gcube/vremanagement/vremodeler/test/ModelerTest.java index 5252ccd..2b826f1 100644 --- a/src/org/gcube/vremanagement/vremodeler/test/ModelerTest.java +++ b/src/org/gcube/vremanagement/vremodeler/test/ModelerTest.java @@ -65,7 +65,7 @@ public class ModelerTest { msptp.setFunctionality(fida); GHNArray ghnArray= new GHNArray(); - ghnArray.setGHNElement(new String[]{"13e6a280-e0b4-11dd-aafb-8e705a88c80f","a9673990-c792-11dd-aa98-9dfda17b7a75"}); + ghnArray.setGHNElement(new String[]{"fbd4db10-e268-11dd-bf95-b9ea85be7470","2baac080-ce27-11dd-a523-acaef5fbd79f"}); msptp.setGHNs(ghnArray); System.out.println("-"+msptp.checkStatus(new VOID()).getReports(0)+"-");