Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@95901 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-05-21 13:49:48 +00:00
parent 46b239a3f7
commit 3e412be8d5
1 changed files with 18 additions and 8 deletions

View File

@ -82,6 +82,7 @@ import org.gcube.data.analysis.tabulardata.service.exception.NoSuchTemplateExcep
import org.gcube.data.analysis.tabulardata.service.impl.TabularDataServiceFactory;
import org.gcube.data.analysis.tabulardata.service.operation.Job;
import org.gcube.data.analysis.tabulardata.service.operation.Task;
import org.gcube.data.analysis.tabulardata.service.operation.TaskId;
import org.gcube.data.analysis.tabulardata.service.tabular.HistoryStep;
import org.gcube.data.analysis.tabulardata.service.tabular.HistoryStepId;
import org.gcube.data.analysis.tabulardata.service.tabular.TabularResource;
@ -6711,7 +6712,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
logger.error("Error in getConnection(): No TableDescriptorMetadata found for table "+table);
throw new TDGWTServiceException("Error in getConnection(): No TableDescriptorMetadata found for table "+table);
}
if(tableDesc.getRefId()==0){
if(tableDesc.getRefId()==0){
logger.error("Error refId=0 for Table:"+table.toString());
throw new TDGWTServiceException("Error refId=0 for Table:"+table.toString());
}
@ -6740,17 +6741,26 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
HttpSession session = this.getThreadLocalRequest().getSession();
SessionUtil.setTaskResubmitSession(session, taskResubmitSession);
ASLSession aslSession = SessionUtil.getAslSession(session);
logger.debug("StartTaskResubmit: "+taskResubmitSession);
AuthorizationProvider.instance.set(new AuthorizationToken(
aslSession.getUsername()));
//TabularDataService service = TabularDataServiceFactory.getService();
TabularDataService service = TabularDataServiceFactory.getService();
//TRId trId=taskResubmitSession.getTrId();
if(taskResubmitSession==null){
logger.error("TaskResubmitSession is null");
throw new TDGWTServiceException("Error in resubmit task: TaskResubmitSession is null");
}
if(taskResubmitSession.getTaskId()==null
|| taskResubmitSession.getTaskId().isEmpty()){
logger.error("Task Id is: "+taskResubmitSession.getTaskId());
throw new TDGWTServiceException("Error in resubmit task, Task Id is: "+taskResubmitSession.getTaskId());
}
//TabularResourceId serviceTR = new TabularResourceId(id);
//Task trTask = service.execute(invocation, serviceTR);
//logger.debug("Start Task on service: TaskId " + trTask.getId());
//SessionUtil.setTaskResubmitTask(session, trTask);
TaskId taskId=new TaskId(taskResubmitSession.getTaskId());
Task trTask = service.resubmit(taskId);
logger.debug("Resubmit Task on service: TaskId " + trTask.getId());
SessionUtil.setTaskResubmitTask(session, trTask);
return;
} catch (TDGWTSessionExpiredException e) {