Revision 54489
Added by Alessia Bardi over 5 years ago
modules/dnet-directindex-api/trunk/src/main/java/eu/dnetlib/openaire/directindex/api/OpenaireResultSubmitter.java | ||
---|---|---|
44 | 44 |
@Resource(name = "openaireplusApisVelocityEngine") |
45 | 45 |
private VelocityEngine velocityEngine; |
46 | 46 |
|
47 |
@Resource |
|
47 |
@Resource(name = "resultSubmitterClientMap")
|
|
48 | 48 |
private IndexClientMap clientMap; |
49 | 49 |
|
50 |
@Resource |
|
50 |
@Resource(name = "resultSubmitterService")
|
|
51 | 51 |
private ResultSubmitterService submitterService; |
52 | 52 |
|
53 | 53 |
@Autowired |
... | ... | |
113 | 113 |
return deleteResult(openaireId, commit); |
114 | 114 |
} |
115 | 115 |
|
116 |
|
|
117 | 116 |
@Deprecated |
118 | 117 |
@RequestMapping(value = { "/api/publications/deleteObject", "/api/results/delete" }, method = RequestMethod.POST) |
119 | 118 |
public @ResponseBody boolean deleteResultPost( |
modules/dnet-directindex-api/trunk/src/main/java/eu/dnetlib/openaire/directindex/api/ResultSubmitterService.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.openaire.directindex.api; |
2 | 2 |
|
3 |
import java.util.Map; |
|
4 |
import java.util.concurrent.Executors; |
|
5 |
import java.util.concurrent.ScheduledExecutorService; |
|
6 |
import java.util.concurrent.TimeUnit; |
|
7 |
import javax.annotation.Resource; |
|
8 |
|
|
3 | 9 |
import eu.dnetlib.data.index.CloudIndexClient; |
4 | 10 |
import eu.dnetlib.data.index.CloudIndexClientException; |
5 | 11 |
import org.apache.commons.logging.Log; |
6 | 12 |
import org.apache.commons.logging.LogFactory; |
7 | 13 |
import org.springframework.beans.factory.annotation.Value; |
8 | 14 |
|
9 |
import javax.annotation.Resource; |
|
10 |
import java.util.Map; |
|
11 |
import java.util.concurrent.Executors; |
|
12 |
import java.util.concurrent.ScheduledExecutorService; |
|
13 |
import java.util.concurrent.TimeUnit; |
|
14 |
|
|
15 | 15 |
public class ResultSubmitterService { |
16 | 16 |
|
17 | 17 |
private static final Log log = LogFactory.getLog(ResultSubmitterService.class); |
18 | 18 |
|
19 |
@Resource |
|
19 |
@Resource(name = "resultSubmitterClientMap")
|
|
20 | 20 |
private IndexClientMap clientMap; |
21 | 21 |
|
22 | 22 |
/** |
... | ... | |
55 | 55 |
log.error("error performing commit on " + i.getColl(), e); |
56 | 56 |
} |
57 | 57 |
} |
58 |
} catch (Throwable e) {
|
|
58 |
} catch (DirecIndexApiException e) {
|
|
59 | 59 |
log.error(e); |
60 | 60 |
} |
61 | 61 |
} |
modules/dnet-directindex-api/trunk/src/main/resources/eu/dnetlib/openaire/directindex/applicationContext-api.xml | ||
---|---|---|
39 | 39 |
</property> |
40 | 40 |
</bean> |
41 | 41 |
|
42 |
<bean id="indexClientMap" class="eu.dnetlib.openaire.directindex.api.IndexClientMap" />
|
|
42 |
<bean id="resultSubmitterClientMap" class="eu.dnetlib.openaire.directindex.api.IndexClientMap" />
|
|
43 | 43 |
|
44 | 44 |
<bean id="resultSubmitterService" class="eu.dnetlib.openaire.directindex.api.ResultSubmitterService" /> |
45 | 45 |
|
Also available in: Unified diff
Fixed missing bean error at container startup because of indexclientmap not found