Merge pull request #581 from garyrussell/INT-2707
* INT-2707: INT-2707 Fix pseudo-transactional Attribute Typo
This commit is contained in:
@@ -93,7 +93,7 @@ public class PollerParser extends AbstractBeanDefinitionParser {
|
||||
IntegrationNamespaceUtils.configureAndSetAdviceChainIfPresent(adviceChainElement, txElement,
|
||||
metadataBuilder, parserContext);
|
||||
|
||||
Element pseudoTxElement = DomUtils.getChildElementByTagName(element, "psuedo-transactional");
|
||||
Element pseudoTxElement = DomUtils.getChildElementByTagName(element, "pseudo-transactional");
|
||||
if (pseudoTxElement != null && txElement != null) {
|
||||
parserContext.getReaderContext().error(
|
||||
"Cannot have both 'transactional' and 'pseudo-transactional' elements", element);
|
||||
|
||||
@@ -1495,7 +1495,7 @@
|
||||
<xsd:element name="advice-chain" type="adviceChainType" minOccurs="0" maxOccurs="1" />
|
||||
</xsd:choice>
|
||||
<xsd:choice minOccurs="0" maxOccurs="1">
|
||||
<xsd:element name="psuedo-transactional" type="pseudoTransactionalType" minOccurs="0" maxOccurs="1">
|
||||
<xsd:element name="pseudo-transactional" type="pseudoTransactionalType" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
This element is used to provide expressions that will be executed on success or failure,
|
||||
|
||||
@@ -11,16 +11,16 @@
|
||||
|
||||
<context:property-placeholder/>
|
||||
|
||||
<int-file:inbound-channel-adapter id="pseudoTx" channel="input" auto-startup="false"
|
||||
directory="${java.io.tmpdir}/si-test1">
|
||||
<int:poller fixed-rate="500">
|
||||
<int:psuedo-transactional on-success-expression="payload.delete()"
|
||||
on-success-result-channel="successChannel"
|
||||
on-failure-expression="'foo'"
|
||||
on-failure-result-channel="failureChannel"
|
||||
send-timeout="500" />
|
||||
</int:poller>
|
||||
</int-file:inbound-channel-adapter>
|
||||
<int-file:inbound-channel-adapter id="pseudoTx" channel="input" auto-startup="false"
|
||||
directory="${java.io.tmpdir}/si-test1">
|
||||
<int:poller fixed-rate="500">
|
||||
<int:pseudo-transactional on-success-expression="payload.delete()"
|
||||
on-success-result-channel="successChannel"
|
||||
on-failure-expression="'foo'"
|
||||
on-failure-result-channel="failureChannel"
|
||||
send-timeout="500" />
|
||||
</int:poller>
|
||||
</int-file:inbound-channel-adapter>
|
||||
|
||||
<int:channel id="input" />
|
||||
|
||||
@@ -34,17 +34,17 @@
|
||||
|
||||
<int:channel id="txInput" />
|
||||
|
||||
<int-file:inbound-channel-adapter id="realTx" channel="txInput" auto-startup="false"
|
||||
directory="${java.io.tmpdir}/si-test2">
|
||||
<int:poller fixed-rate="500">
|
||||
<int:transactional transaction-manager="txManager" />
|
||||
<int:transaction-synchronization on-success-expression="@txManager.committed"
|
||||
on-success-result-channel="successChannel"
|
||||
on-failure-expression="@txManager.rolledBack"
|
||||
on-failure-result-channel="failureChannel"
|
||||
send-timeout="5000" />
|
||||
</int:poller>
|
||||
</int-file:inbound-channel-adapter>
|
||||
<int-file:inbound-channel-adapter id="realTx" channel="txInput" auto-startup="false"
|
||||
directory="${java.io.tmpdir}/si-test2">
|
||||
<int:poller fixed-rate="500">
|
||||
<int:transactional transaction-manager="txManager" />
|
||||
<int:transaction-synchronization on-success-expression="@txManager.committed"
|
||||
on-success-result-channel="successChannel"
|
||||
on-failure-expression="@txManager.rolledBack"
|
||||
on-failure-result-channel="failureChannel"
|
||||
send-timeout="5000" />
|
||||
</int:poller>
|
||||
</int-file:inbound-channel-adapter>
|
||||
|
||||
<bean id="txManager" class="org.springframework.integration.file.FileInboundTransactionTests$DummyTxManager" />
|
||||
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns:file="http://www.springframework.org/schema/integration/file"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:p="http://www.springframework.org/schema/p" xmlns:si="http://www.springframework.org/schema/integration" xmlns:util="http://www.springframework.org/schema/util"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:p="http://www.springframework.org/schema/p" xmlns:si="http://www.springframework.org/schema/integration" xmlns:util="http://www.springframework.org/schema/util"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration
|
||||
http://www.springframework.org/schema/integration/spring-integration.xsd
|
||||
http://www.springframework.org/schema/integration/file
|
||||
http://www.springframework.org/schema/integration/file/spring-integration-file.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
|
||||
|
||||
<!-- under test -->
|
||||
<file:inbound-channel-adapter
|
||||
directory="#{inputDirectory.path}"
|
||||
channel="fileMessages" filter="compositeFilter"/>
|
||||
<!-- under test -->
|
||||
<file:inbound-channel-adapter
|
||||
directory="#{inputDirectory.path}"
|
||||
channel="fileMessages" filter="compositeFilter"/>
|
||||
|
||||
<bean id="temp" class="org.junit.rules.TemporaryFolder"
|
||||
init-method="create" destroy-method="delete"/>
|
||||
<bean id="temp" class="org.junit.rules.TemporaryFolder"
|
||||
init-method="create" destroy-method="delete"/>
|
||||
|
||||
<bean id="inputDirectory" class="java.io.File">
|
||||
<constructor-arg value="#{temp.newFolder('FileToChannelIntegrationTests').path}"/>
|
||||
</bean>
|
||||
<bean id="inputDirectory" class="java.io.File">
|
||||
<constructor-arg value="#{temp.newFolder('FileToChannelIntegrationTests').path}"/>
|
||||
</bean>
|
||||
|
||||
<si:channel id="fileMessages">
|
||||
<si:queue capacity="10"/>
|
||||
</si:channel>
|
||||
<si:channel id="fileMessages">
|
||||
<si:queue capacity="10"/>
|
||||
</si:channel>
|
||||
|
||||
<bean class="org.springframework.integration.file.filters.CompositeFileListFilter" id="compositeFilter">
|
||||
<constructor-arg>
|
||||
<util:list>
|
||||
<bean class="org.springframework.integration.file.config.FileListFilterFactoryBean" p:preventDuplicates="true"/>
|
||||
<bean class="org.springframework.integration.file.config.FileListFilterFactoryBean" p:preventDuplicates="false"/>
|
||||
<bean class="org.springframework.integration.file.config.FileListFilterFactoryBean" p:filenamePattern="test*"/>
|
||||
</util:list>
|
||||
<util:list>
|
||||
<bean class="org.springframework.integration.file.config.FileListFilterFactoryBean" p:preventDuplicates="true"/>
|
||||
<bean class="org.springframework.integration.file.config.FileListFilterFactoryBean" p:preventDuplicates="false"/>
|
||||
<bean class="org.springframework.integration.file.config.FileListFilterFactoryBean" p:filenamePattern="test*"/>
|
||||
</util:list>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
|
||||
<si:poller default="true" fixed-rate="10">
|
||||
<si:psuedo-transactional on-success-expression="payload.delete()"
|
||||
<si:pseudo-transactional on-success-expression="payload.delete()"
|
||||
on-success-result-channel="resultChannel" />
|
||||
</si:poller>
|
||||
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
|
||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
|
||||
|
||||
<si:channel id="resultChannel">
|
||||
<si:queue />
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration/file"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:integration="http://www.springframework.org/schema/integration"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:integration="http://www.springframework.org/schema/integration"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration
|
||||
http://www.springframework.org/schema/integration/spring-integration.xsd
|
||||
http://www.springframework.org/schema/integration/file
|
||||
http://www.springframework.org/schema/integration/file/spring-integration-file.xsd">
|
||||
|
||||
<inbound-channel-adapter id="inputDirPoller"
|
||||
directory="${java.io.tmpdir}"
|
||||
filter="filter"
|
||||
comparator="testComparator"
|
||||
auto-startup="false">
|
||||
<integration:poller fixed-rate="5000">
|
||||
<integration:psuedo-transactional on-success-expression="payload.delete()"
|
||||
on-success-result-channel="successChannel"
|
||||
on-failure-expression="'foo'"
|
||||
on-failure-result-channel="nullChannel"
|
||||
send-timeout="5000" />
|
||||
</integration:poller>
|
||||
</inbound-channel-adapter>
|
||||
<inbound-channel-adapter id="inputDirPoller"
|
||||
directory="${java.io.tmpdir}"
|
||||
filter="filter"
|
||||
comparator="testComparator"
|
||||
auto-startup="false">
|
||||
<integration:poller fixed-rate="5000">
|
||||
<integration:pseudo-transactional on-success-expression="payload.delete()"
|
||||
on-success-result-channel="successChannel"
|
||||
on-failure-expression="'foo'"
|
||||
on-failure-result-channel="nullChannel"
|
||||
send-timeout="5000" />
|
||||
</integration:poller>
|
||||
</inbound-channel-adapter>
|
||||
|
||||
<integration:channel id="successChannel" />
|
||||
|
||||
<beans:bean id="filter" class="org.springframework.integration.file.config.FileListFilterFactoryBean"/>
|
||||
<beans:bean id="filter" class="org.springframework.integration.file.config.FileListFilterFactoryBean"/>
|
||||
|
||||
<beans:bean id="compositeFilter" class="org.springframework.integration.file.filters.CompositeFileListFilter">
|
||||
<beans:constructor-arg>
|
||||
<beans:list/>
|
||||
</beans:constructor-arg>
|
||||
</beans:bean>
|
||||
<beans:constructor-arg>
|
||||
<beans:list/>
|
||||
</beans:constructor-arg>
|
||||
</beans:bean>
|
||||
|
||||
<beans:bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
|
||||
<beans:bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
|
||||
|
||||
<beans:bean id="testComparator"
|
||||
class="org.springframework.integration.file.config.FileInboundChannelAdapterParserTests$TestComparator"/>
|
||||
<beans:bean id="testComparator"
|
||||
class="org.springframework.integration.file.config.FileInboundChannelAdapterParserTests$TestComparator"/>
|
||||
|
||||
</beans:beans>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
temporary-file-suffix=".foo"
|
||||
remote-directory="foo/bar">
|
||||
<int:poller fixed-rate="1000">
|
||||
<int:psuedo-transactional on-success-expression="'foo'"
|
||||
<int:pseudo-transactional on-success-expression="'foo'"
|
||||
on-success-result-channel="successChannel"
|
||||
on-failure-expression="'bar'"
|
||||
on-failure-result-channel="failureChannel"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
comparator="comparator"
|
||||
delete-remote-files="${delete.remote.files}">
|
||||
<poller fixed-rate="1000">
|
||||
<psuedo-transactional on-success-expression="'foo'"
|
||||
<pseudo-transactional on-success-expression="'foo'"
|
||||
on-success-result-channel="successChannel"
|
||||
on-failure-expression="'bar'"
|
||||
on-failure-result-channel="failureChannel"
|
||||
|
||||
Reference in New Issue
Block a user