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