git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vre-management/VREModeler@18185 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
af6d9c50a5
commit
6091eac3ff
|
@ -1,5 +1,5 @@
|
|||
package = org.gcube.vremanagement.vremodeler
|
||||
lib.dir = Dependencies/VDLModeler
|
||||
lib.dir = Dependencies/VREModeler
|
||||
wsdl.1 = ModelerFactory
|
||||
wsdl.2 = ModelerService
|
||||
namespace.1=http://gcube-system.org/namespaces/vremanagement/vremodeler
|
||||
|
|
|
@ -18,7 +18,7 @@ import org.gcube.vremanagement.vremodeler.stubs.GetExistingNamesResponseMessage;
|
|||
|
||||
public class ModelFactoryService{
|
||||
|
||||
private GCUBELog logger = new GCUBELog(ModelFactoryService.class.getName());
|
||||
private GCUBELog logger = new GCUBELog(ModelFactoryService.class);
|
||||
private static final UUIDGen uuidGen = UUIDGenFactory.getUUIDGen();
|
||||
|
||||
protected ServiceContext getServiceContext() {
|
||||
|
@ -60,7 +60,7 @@ public class ModelFactoryService{
|
|||
res= DBInterface.queryDB("select VRE.name from VRE;");
|
||||
while (res.next())
|
||||
toReturn.add(res.getString(1));
|
||||
}catch(Exception e) {logger.error("VRE Model: error on DB"); throw new GCUBEFault(e);}
|
||||
}catch(Exception e) {logger.error("error on DB"); throw new GCUBEFault(e);}
|
||||
GetExistingNamesResponseMessage response = new GetExistingNamesResponseMessage();
|
||||
response.setNames(toReturn.toArray(new String[0]));
|
||||
|
||||
|
@ -122,21 +122,21 @@ public class ModelFactoryService{
|
|||
*
|
||||
* remove the DL instance
|
||||
*
|
||||
* @param request the id of DL to remove
|
||||
* @param request the id of VRE to remove
|
||||
* @return void
|
||||
* @throws RemoteException -
|
||||
*/
|
||||
public void removeVRE(String id) throws GCUBEFault{
|
||||
public VOID removeVRE(String id) throws GCUBEFault{
|
||||
logger.trace("Deleting resource with id "+id);
|
||||
try{
|
||||
ModelerContext pctx= ModelerContext.getPortTypeContext();
|
||||
logger.trace("Deleting resource with id "+id);
|
||||
//destroy the resource;
|
||||
DBInterface.ExecuteUpdate("DELETE FROM VRE where VRE.id='"+id+"';");
|
||||
pctx.getWSHome().remove(pctx.makeKey(id));
|
||||
return new VOID();
|
||||
}catch(Exception e){
|
||||
logger.error("VDLModel: "+e.getMessage());
|
||||
|
||||
throw new GCUBEFault( e);
|
||||
logger.error("error removing resource",e);
|
||||
throw new GCUBEFault(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue