The 'channel' element now requires an 'id'.

This commit is contained in:
Mark Fisher
2008-01-22 00:52:07 +00:00
parent c9c9a0875c
commit 55283444da
5 changed files with 25 additions and 15 deletions

View File

@@ -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;
}

View File

@@ -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>

View File

@@ -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
}