This commit is contained in:
Lucio Lelii 2010-01-29 16:42:06 +00:00
parent af6d9c50a5
commit 6091eac3ff
2 changed files with 9 additions and 9 deletions

View File

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

View File

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