INT-2255 fixed Gemfire CQ parser errors
This commit is contained in:
committed by
Mark Fisher
parent
8d9192b9fb
commit
451408e0f7
@@ -12,16 +12,17 @@
|
||||
*/
|
||||
package org.springframework.integration.gemfire.config.xml;
|
||||
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.integration.config.xml.AbstractChannelAdapterParser;
|
||||
import org.springframework.integration.config.xml.IntegrationNamespaceUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* @author David Turanski
|
||||
* @author Dan Oxlade
|
||||
* @since 2.1
|
||||
*
|
||||
*/
|
||||
@@ -50,9 +51,7 @@ public class GemfireCqInboundChannelAdapterParser extends AbstractChannelAdapter
|
||||
|
||||
private static final String QUERY_EVENTS_ATTRIBUTE = "query-events";
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.integration.config.xml.AbstractChannelAdapterParser#doParse(org.w3c.dom.Element, org.springframework.beans.factory.xml.ParserContext, java.lang.String)
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected AbstractBeanDefinition doParse(Element element, ParserContext parserContext, String channelName) {
|
||||
BeanDefinitionBuilder continuousQueryMesageProducer = BeanDefinitionBuilder.genericBeanDefinition(GEMFIRE_INBOUND_CONTINUOUS_QUERY_MESSAGE_PRODUCER);
|
||||
@@ -60,11 +59,11 @@ public class GemfireCqInboundChannelAdapterParser extends AbstractChannelAdapter
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(continuousQueryMesageProducer, element, QUERY_EVENTS_ATTRIBUTE, SUPPORTED_EVENT_TYPES_PROPERTY);
|
||||
|
||||
if (!element.hasAttribute(QUERY_LISTENER_CONTAINER_ATTRIBUTE)){
|
||||
parserContext.getReaderContext().error("'query-listener-container' attribute is required.",element);
|
||||
parserContext.getReaderContext().error("'" + QUERY_LISTENER_CONTAINER_ATTRIBUTE + "' attribute is required.",element);
|
||||
}
|
||||
|
||||
if (!element.hasAttribute(QUERY_ATTRIBUTE)){
|
||||
parserContext.getReaderContext().error("'query' attribute is required.",element);
|
||||
parserContext.getReaderContext().error("'" + QUERY_ATTRIBUTE + "' attribute is required.",element);
|
||||
}
|
||||
|
||||
continuousQueryMesageProducer.addConstructorArgReference(element.getAttribute(QUERY_LISTENER_CONTAINER_ATTRIBUTE));
|
||||
|
||||
Reference in New Issue
Block a user