Commit ccf15d2e authored by Matija Obreza's avatar Matija Obreza
Browse files

Firehose: Removed @Component to prevent duplicate instances

parent 94bdc9a7
......@@ -27,7 +27,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
import org.springframework.transaction.event.TransactionPhase;
import org.springframework.transaction.event.TransactionalApplicationListener;
import org.springframework.transaction.event.TransactionalEventListener;
......@@ -46,7 +45,7 @@ import java.util.concurrent.BlockingQueue;
*
* @author Matija Obreza
*/
@Component
// Instantiated in ElasticsearchConfig! @Component
public class FirehoseReindexListener implements InitializingBean {
private final static Logger LOG = LoggerFactory.getLogger(FirehoseReindexListener.class);
......
......@@ -15,7 +15,6 @@
*/
package org.genesys2.server.component.firehose;
import org.springframework.stereotype.Component;
import org.springframework.transaction.event.TransactionPhase;
import org.springframework.transaction.event.TransactionalApplicationListener;
import org.springframework.transaction.event.TransactionalEventListener;
......@@ -33,7 +32,7 @@ import java.util.Set;
*
* @author Artem Hrybeniuk
*/
@Component
// Instantiated in FirehoseConfig! @Component("firehoseEventListener")
public class FirehoseEventListener {
@Resource(name = "updatedEventSet")
......
......@@ -29,7 +29,6 @@ import org.springframework.aop.framework.Advised;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
......@@ -55,7 +54,7 @@ import java.util.stream.Collectors;
* @author Matija Obreza
*/
@Aspect
@Component("firehoseJPAListener")
// Instantiated in FirehoseConfig! @Component("firehoseJPAListener")
public class FirehoseJPAListener implements InitializingBean {
private final static Logger LOG = LoggerFactory.getLogger(FirehoseJPAListener.class);
......
......@@ -20,7 +20,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.ArrayList;
......@@ -34,7 +33,7 @@ import java.util.NavigableSet;
*
* @author Artem Hrybeniuk
*/
@Component("firehoseMessageProcessor")
// Instantiated in FirehoseConfig! @Component("firehoseMessageProcessor")
public class FirehoseMessageProcessor {
public static final Logger LOG = LoggerFactory.getLogger(FirehoseMessageProcessor.class);
......
......@@ -85,7 +85,7 @@ public class FirehoseConfig {
}
@Bean
public FirehoseMessageProcessor firehoseReindexProcessor() {
public FirehoseMessageProcessor firehoseMessageProcessor() {
return new FirehoseMessageProcessor();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment