INT-2607: refactor 'resolveId' with pC.isNested()

* add delegation to `BeanDefinitionReaderUtils.generateBeanName(definition, parserContext.getRegistry(), parserContext.isNested())`
in the `AbstractBeanDefinitionParser#resolveId()` implementations when it is necessary.
* remove redundant `shouldGenerateId()` & `shouldGenerateIdAsFallback()` when they don't make sense.
* additional simple polishing in the affected classes.
* remove TODO & forced 'id' attribute from JpaOutboundGatewayTests-context.xml to check that this solution works as was booked.

JIRA: https://jira.springsource.org/browse/INT-2607
This commit is contained in:
Artem Bilan
2012-06-21 16:42:06 +03:00
committed by Gary Russell
parent 284464383d
commit 25a2efe59c
8 changed files with 29 additions and 78 deletions

View File

@@ -30,14 +30,6 @@ import org.w3c.dom.Element;
*/
public class JdbcOutboundGatewayParser extends AbstractConsumerEndpointParser {
protected boolean shouldGenerateId() {
return false;
}
protected boolean shouldGenerateIdAsFallback() {
return true;
}
@Override
protected BeanDefinitionBuilder parseHandler(Element element, ParserContext parserContext) {
String dataSourceRef = element.getAttribute("data-source");

View File

@@ -32,14 +32,6 @@ import org.w3c.dom.Element;
*/
public class StoredProcOutboundGatewayParser extends AbstractConsumerEndpointParser {
protected boolean shouldGenerateId() {
return false;
}
protected boolean shouldGenerateIdAsFallback() {
return true;
}
@Override
protected BeanDefinitionBuilder parseHandler(Element element, ParserContext parserContext) {