The 'channel' element now requires an 'id'.
This commit is contained in:
@@ -66,9 +66,6 @@ public class ChannelParser implements BeanDefinitionParser {
|
||||
}
|
||||
channelDef.getConstructorArgumentValues().addGenericArgumentValue(dispatcherPolicy);
|
||||
String beanName = element.getAttribute(ID_ATTRIBUTE);
|
||||
if (!StringUtils.hasText(beanName)) {
|
||||
beanName = parserContext.getReaderContext().generateBeanName(channelDef);
|
||||
}
|
||||
parserContext.registerBeanComponent(new BeanComponentDefinition(channelDef, beanName));
|
||||
return channelDef;
|
||||
}
|
||||
|
||||
@@ -47,15 +47,12 @@
|
||||
Defines a message channel.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="beans:identifiedType">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="dispatcher-policy" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="capacity" type="xsd:integer"/>
|
||||
<xsd:attribute name="publish-subscribe" type="xsd:boolean" default="false"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="dispatcher-policy" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:ID" use="required"/>
|
||||
<xsd:attribute name="capacity" type="xsd:integer"/>
|
||||
<xsd:attribute name="publish-subscribe" type="xsd:boolean" default="false"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
@@ -53,9 +53,7 @@ public class MessagePublishingErrorHandler implements ErrorHandler {
|
||||
public void handle(Throwable t) {
|
||||
if (this.errorChannel != null) {
|
||||
try {
|
||||
if(this.errorChannel.send(new ErrorMessage(t), this.sendTimeout)) {
|
||||
return;
|
||||
}
|
||||
this.errorChannel.send(new ErrorMessage(t), this.sendTimeout);
|
||||
}
|
||||
catch (Throwable ignore) { // message will be logged only
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user