switch subscriptionchannelfactory to autowire
This commit is contained in:
parent
41b5eb2484
commit
b33ad73d46
|
@ -211,7 +211,7 @@ public abstract class BaseConfig {
|
|||
|
||||
@Bean
|
||||
public SubscriptionChannelFactory subscriptionChannelFactory() {
|
||||
return new SubscriptionChannelFactory(subscribableChannelFactory());
|
||||
return new SubscriptionChannelFactory();
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
|
|
@ -22,16 +22,14 @@ package ca.uhn.fhir.jpa.subscription.module.channel;
|
|||
|
||||
import ca.uhn.fhir.jpa.subscription.module.ResourceModifiedMessage;
|
||||
import ca.uhn.fhir.jpa.subscription.module.subscriber.ResourceDeliveryMessage;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.messaging.SubscribableChannel;
|
||||
|
||||
public class SubscriptionChannelFactory {
|
||||
|
||||
@Autowired
|
||||
private ISubscribableChannelFactory mySubscribableChannelFactory;
|
||||
|
||||
public SubscriptionChannelFactory(ISubscribableChannelFactory theSubscribableChannelFactory) {
|
||||
mySubscribableChannelFactory = theSubscribableChannelFactory;
|
||||
}
|
||||
|
||||
public SubscribableChannel newDeliveryChannel(String theChannelName) {
|
||||
return mySubscribableChannelFactory.createSubscribableChannel(theChannelName, ResourceDeliveryMessage.class, mySubscribableChannelFactory.getDeliveryChannelConcurrentConsumers());
|
||||
}
|
||||
|
|
|
@ -45,6 +45,6 @@ public abstract class BaseSubscriptionConfig {
|
|||
|
||||
@Bean
|
||||
public SubscriptionChannelFactory subscriptionChannelFactory() {
|
||||
return new SubscriptionChannelFactory(subscribableChannelFactory());
|
||||
return new SubscriptionChannelFactory();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue