Revision 23157c56
Added by Katja Luther over 4 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/util/ProgressMonitorClientManager.java | ||
---|---|---|
15 | 15 |
|
16 | 16 |
import org.apache.log4j.Logger; |
17 | 17 |
import org.eclipse.core.runtime.SubMonitor; |
18 |
import org.springframework.remoting.RemoteAccessException; |
|
18 | 19 |
|
19 | 20 |
import eu.etaxonomy.cdm.api.application.CdmApplicationState; |
20 | 21 |
import eu.etaxonomy.cdm.api.service.IProgressMonitorService; |
... | ... | |
127 | 128 |
int serverTotalWorkDone = 0; |
128 | 129 |
// loop until the operation is done |
129 | 130 |
int feedbackCount = 0; |
131 |
int failCount = 10; |
|
130 | 132 |
while(!(remotingMonitor.isCanceled() || remotingMonitor.isFailed() || remotingMonitor.isDone())) { |
131 | 133 |
// wait for pollInterval, then |
132 | 134 |
// .... retrieve remoting monitor, then |
133 | 135 |
// .... set client monitor info |
134 | 136 |
Thread.sleep(pollInterval); |
135 |
remotingMonitor = progressMonitorService.getRemotingMonitor(uuid); |
|
137 |
try{ |
|
138 |
remotingMonitor = progressMonitorService.getRemotingMonitor(uuid); |
|
139 |
}catch(RemoteAccessException e){ |
|
140 |
failCount--; |
|
141 |
if (failCount > 0){ |
|
142 |
continue; |
|
143 |
} |
|
144 |
|
|
145 |
} |
|
136 | 146 |
// check if remoting monitor is waiting for feedback |
137 | 147 |
if(remotingMonitor.getIsWaitingForFeedback()) { |
138 | 148 |
if(feedbackGenerators != null) { |
Also available in: Unified diff
ref #8431: improve progress monitor/bar in editor for import/export