INT-2723/24 RedisStore Inbound/Outbound docs

INT-2723 Polishing

Polish docs

Remove #store SpEL variable from the Tx Synchronization.
This commit is contained in:
Oleg Zhurakousky
2012-09-12 06:38:43 -04:00
committed by Gary Russell
parent b9e7762429
commit a013b66af0
4 changed files with 190 additions and 11 deletions

View File

@@ -32,9 +32,7 @@ import org.springframework.integration.Message;
import org.springframework.integration.context.IntegrationObjectSupport;
import org.springframework.integration.core.MessageSource;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.integration.transaction.MessageSourceResourceHolder;
import org.springframework.integration.util.ExpressionUtils;
import org.springframework.transaction.support.TransactionSynchronizationManager;
import org.springframework.util.Assert;
/**
* Inbound channel adapter which returns a Message representing a view into
@@ -152,12 +150,6 @@ public class RedisStoreMessageSource extends IntegrationObjectSupport
RedisStore store = this.createStoreView(key);
Object holder = TransactionSynchronizationManager.getResource(this);
if (holder != null) {
Assert.isInstanceOf(MessageSourceResourceHolder.class, holder);
((MessageSourceResourceHolder) holder).addAttribute("store", store);
}
if (store instanceof Collection<?> && ((Collection<Object>)store).size() < 1){
return null;
}

View File

@@ -46,7 +46,7 @@
</int-redis:store-inbound-channel-adapter>
<int:transaction-synchronization-factory id="syncFactory">
<int:after-commit expression="#store.removeByScore(18, 18)"/>
<int:after-commit expression="payload.removeByScore(18, 18)"/>
</int:transaction-synchronization-factory>
<int:channel id="redisChannel">