Commit Graph

2293 Commits

Author SHA1 Message Date
Gary Russell
f294086684 INT-2707 Fix pseudo-transactional Attribute Typo
s/psuedo-/pseudo-/
2012-08-09 08:09:50 -04:00
Artem Bilan
d4e135b13d INT-2649: DelayHandler: tx & adviceChain support
* 'delayer-type' XSD: add `<transactional>` & `<advice-chain>`
* move `PollerParser#configureAdviceChain` into `IntegrationNamespaceUtils`
* DelayerParser: parsing `<transactional>` & `<advice-chain>` via `IntegrationNamespaceUtils#configureAdviceChain`
* DelayHandler: add `adviceChain` property
* DelayHandler: introduce `ReleaseMessageHandler` to apply `adviceChain` capabilities around `DelayHandler#doReleaseMessage`
* DelayerParserTests: tests for introduced sub-elements
* DelayerHandlerRescheduleIntegrationTests: test for transaction boundaries with intentional rollback in the message-flow after message release

JIRA: https://jira.springsource.org/browse/INT-2649

Resolve conflicts; polishing.
2012-08-06 12:09:30 -04:00
Gary Russell
08cbab08c2 INT-2214, INT-343, INT-2250 MessageHandler Advice
Add general capability to advise just the handleRequestMessage
part of an AbstractReplyProducingMessageHandler.

This is to advise just the immediate operation, and not the
entire downstream flow.

Uses include:

* outbound gateway post processing
* adding retry behavior using spring-retry
* adding circuit breaker functionality

Initial commit for review.

Also need to advise simple message handlers (such as file
etc) to allow them to post-process file operations
with payload.delete(), payload.renameTo(...) etc.

INT-2250 Add Circuit Breaker Advice

INT-343 Add Retry Advice

Stateless and Stateful retry using spring-retry. Stateless
means the RetryTemplate performs the retries internally.
Stateful means the exception is thrown (e.g. to JMS container)
and the retry state is maintained by spring-retry.

INT-2215, INT-343, INT-2250 Refactoring

Factor out common abstract Advice class.

INT-2214 Catch Evaluation Expression Exceptions

If an onSuccess expression evaluation fails, add an
option so the user can decide whether such an exception is
caught, or propagated to the caller.

INT-2214 etc PR Review Polishing

INT-2214 etc Namespace Core, File, FTP

Add <request-handler-advice-chain/> to outbound endpoints.

INT-2214 etc. More Namespace Support

amqp, event, gemfire, groovy, http, ip, jdbc, jms, jmx, jpa, mail, rmi, sftp, twitter, ws, xmpp

INT-2214 etc Polishing

PR Review

INT-2214 etc Polishing

Don't catch Throwable.

Move Advice classes to handler.advice package.
2012-08-06 09:15:58 -04:00
Gary Russell
4de02fa75e INT-2685 Transaction Synchronization
Remove M3 disposition-* attributes on File/(S)FTP inbound adapters.

Add <pseudo-transactional/> and <transaction-synchronization/> elements
to <poller/>.

These elements provide the following attributes:

* on-success-expression
* on-success-result-channel
* on-failure-expression
* on-failure-result-channel
* send-timeout

<transaction-synchronization/> synchronizes these expression evaluations
with the transaction, such that they are executed immediately after
the commit/rollback.

<psuedo-transactional/> is used for a non-transactional poller.

When an <advice-chain/> is provided to the poller, <psuedo-transactional/>
and <transaction-synchronization/> are synonyms; and the behavior is
dictated by whether or not the <advice-chain/> contains a transaction
advice. It is recommended that <pseudo-transactional/> is used when the
<advice-chain/> does not have a txAdvice, and <transaction-synchronization/>
when it does, but the framework does not enforce this.

The expressions have the original (polled) message as the #root variable.
In addition, a BeanResolver is provided, allowing expressions such as
'@someBean.handleSuccess(payload)'.

MessageSources may also implement PseudoTransactionalMessageSource. This
has a number of methods allowing more flexibility in transactional and
non-transactional environents. For example, for backwards compatibility.
the mail-inbound-channel-adapter deletes its polled message after the
receive() rather than after the polled message is sent (when running in
a non-transactional poller). However, when running in a transactional
poller, the delete is done after the transaction commits (but not when
it rolls back).

In addition, MessageSources that implement this interface can optionally
provide an arbitrary object to the success/failure expressions in a
variable named '#resource'.

INT-2685 Polishing

PR Review Comments

Add tests for non-tx PseudoTransactionalMessageSource
2012-08-03 14:04:22 -04:00
Gunnar Hillert
57bc67b8fb INT-2689 - SI builds without warnings (Except Spring Integration HTTP)
* Ensure that no deprecation warnings occur
* Spring Integration builds with all tests successfully for Spring 3.1.2.RELEASE and 3.0.7.RELEASE (Except Spring Integration HTTP)

For reference see: https://jira.springsource.org/browse/INT-2689

INT-2694 - Fix Http Test Failures with Spring 3.0

As part of INT-2689, fix Http Test Failures in the Spring Integration Http Module when using Spring 3.0.7.RELEASE
For reference see: https://jira.springsource.org/browse/INT-2694
2012-08-01 13:09:51 -04:00
Gary Russell
2ecb14de2a INT-2285 Implement max-subscribers on Channels
Add a subscriber limit on both unicast and publish-subscribe
channels. This permits detection of inadvertent channel wiring
during context initialization.

Also add a mechanism to globally set these defaults.

Two properties are added to ChannelInitializer. If the
'channelInitializer' bean is declared before a channel, and
these properties are set, it will globally override the
default (Integer.MAX_VALUE) for these properties.

For example:

    <bean id="channelInitializer" class="org.springframework.integration.config.xml.ChannelInitializer">
        <property name="autoCreate" value="true" />
        <property name="defaultMaxUnicastSubscribers" value="1" />
        <property name="defaultMaxMulticastSubscribers" value="2" />
    </bean>

will make the default max-subscribers 1 and 2 for <channel/> and
<publish-subscribe/> channels respectively.

Also applies to module channels (jms, amqp, redis).
2012-07-16 14:12:27 -04:00
Oleg Zhurakousky
760c488e41 INT-2666 Fix NPE in SimpleMessageStore
INT-2666 polished test

Polishing
2012-07-12 17:52:22 -04:00
Gary Russell
4eeab94d59 INT-2650 Don't Convert byte[]
The problem reported by INT-2630 was more extensive. For example,
the unconditional parameter conversion causes arrays to be copied
unnecessarily.

The BeanFactoryTypeConverter now does a no-op conversion whenever
the source type is assignable to the target type.

This effectively reverts to the Spring 3.0 behavior, where this
assertion resulted in the argument not being added to the
argsRequiringConversion array.

Polishing

Add a couple more tests
2012-07-06 13:52:53 -04:00
Oleg Zhurakousky
d2d9d67edb INT-2610 Fix Gateway Mapping Issue
Fix the inability for mappings by convention to be overriden with payload expression

Cherry-pick PR #531
2012-07-02 13:19:25 -04:00
Artem Bilan
dce4e8ec01 INT-2641: fix JavaDoc warnings
JIRA: https://jira.springsource.org/browse/INT-2641
2012-06-29 09:42:58 -04:00
Gary Russell
7501838b38 INT-2630 MessageHeaders/History Conversion Issue
Spring-expression 3.1 unconditionally converts all arguments for
method calls; MessageHeaders and MessageHistory do not have
no-arg constructors and the MapToMapConverter always attempts
conversion, in case any elements require conversion.

We are exploring a Spring 3.1 change but, in the meantime, we
have a detour in BeanFactoryTypeConverter in that we
can skip conversion of these types.
2012-06-27 11:55:34 -04:00
Gary Russell
d66ba9ca74 INT-2636 Gateway Timeout Changes
Previously, the timeouts in @Gateway method annotations always
overrode the default timeout if specified in, say, XML.

Now, the @Gateway timeouts are applied only if

* The equivalent default was not set
* The annotation value is something other than the default (Long.MIN_VALUE)

Note: This is a breaking change for one scenario:

<int:gateway ... default-reply-timeout=1000 ... />

where the interface has a method annotated with @Gateway(replyTimeout=Long.MIN_VALUE)

In other words, when the user wants a default timeout on the gateway
but wants to override it for just the annotated method and happened to use
the new default value.

The @Gateway annotation does not allow us to detect whether its
attribute value came from the default or was explicitly set.

The work-around for this breaking change is to use a different negative
number to configure an infinite timeout:

@Gateway(replyTimeout=-1)
2012-06-27 09:15:31 -04:00
Gary Russell
ae0abc4f6c INT-2515 More Orderly Shutdown
* Add beginShutdown() and endShutdown() to OrderlyShutdownCapable
* JMS/AMQP stop listener containers
* TCP (server side)
** after beginShutdown() disallow new connections, drop (log) new messages
** after endShutdown() close server socket
* HTTP (server side)
** after beginShutdown() disallow any new requests (503 Service Unavailable)

* Docbook updates
** What's new section
** Orderly Shutdown section.
2012-06-26 10:31:22 -04:00
Gary Russell
066eb91100 INT-1849/INT-2147 Add Disposition to File Adapter
* Add *disposition-expression* to the inbound file adapter. This allows for operations such as *payload.delete()*, *payload.renameTo()* after the file is processed.
* The result of executing the expression (if any) is sent to the disposition-result-channel.
2012-06-25 11:38:20 -04:00
Artem Bilan
0e31624083 INT-1132 Fix Failing Delyer Test
INT-1132: Eliminate delayer's tests sensitive

* There is no guarantee that a Message will be delayed after restart for exactly the remaining time; it may be delayed longer.
* Remove assert around 'receive time'
* Remove redundant LIFO test-case: now `DelayHandler` just uses simple iteration over `MessageGroup`

JIRA: https://jira.springsource.org/browse/INT-1132

Build report: https://build.springsource.org/browse/INT-B22X-JOB1-91/test/case/110952529
2012-06-21 17:31:25 -04:00
Artem Bilan
25a2efe59c 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
2012-06-21 14:30:32 -04:00
Oleg Zhurakousky
2b49c66f64 INT-1141 Improve on how MessageHandlers are stored
INT-1141 polished code

INT-1141 added tests

INT-1141 improved how iterator is obtaind from OrderAwareLikedHashSet

INT-1141 polishing

INT-1141 stashed commit with List-based collection and performance tests

INT-1141 improved OrderedAwareLinkedHashSet

INT-1141 polishing

INT-1141, INT-2627 improved LoadBalancingStrategy and
RoundRobinLoadBalancingStrategy to obtain handler's iterator faster

INT-1141 improved getHandlerIterator method to ensure that it only executes reordering logic if there are more then one handler

INT-1141 simplified OrderedAwareLinkedHashSet to not to extend from LinkedHashSet

INT-1141
changed OrderedAwareLinkedHashSet to OrderedAwareCopyOnWriteArraySetTests, imporoved array creation in RoundRobinLoadBalancingStrategy

INT-1141 polished failing tests and RoundRobinLoadBalancingStrategy. Removed 'transient' from OrderedAwareCopyOnWriteArraySet
2012-06-21 13:03:50 -04:00
Artem Bilan
e5061c070b INT-2622: add JMX support for DelayerHandler
* introduce DelayHandlerManagement
* add GroovyControlBusIntegrationTests
* test for Delayer Management via Groovy Control Bus
2012-06-21 11:33:17 -04:00
Artem Bilan
de73c39488 INT-2605: add SmartLifecycle support for 'chain'
* polishing TCP test to use SmartLifecycle from 'chain'
* polishing XSD to exclude using 'poller' element inside 'nested-chain'

INT-2605: eliminate breaking change in the XSD
2012-06-21 10:06:47 -04:00
Gunnar Hillert
708306a891 INT-2616 - Fix Spelling Error in Schema
* Fix spelling error - `hostory`
* Remove trailing white-space

INT-2616 - Fixed several spelling issues
2012-06-20 11:13:39 -04:00
Artem Bilan
d1d4faa151 INT-1132: Rescheduling Support for DelayHandler
- Add support for DelayHandler to reschedule persisted Messages on startup via 'implements ApplicationListener<ContextRefreshedEvent>' as late as possible
- Change DelayHandler dependency to MessageGroupStore
- Add required DelayHandler.messageGroupId property
- Make registered by SI-namespace TaskScheduler as default for DelayHandler
- Remove 'required' from delayer xml-attribute 'default-delay' as redundant
- Additional refactoring & polishing around <delayer>
- Polishing delayer's Tests
- Tests for 'rescheduling'
- Integration test for 'rescheduling' with JdbcMS

INT-1132: add 'initializingLatch' to DelayHandler

INT-1132: additional polishing

INT-1132: add LIFO JMS polling test-case

INT-1132: Changes according to PR comments

INT-1132: Changes according to PR comments 2

Polishing

Remove blocking calls from tests.
2012-06-19 10:00:03 -04:00
Gunnar Hillert
7651d9fdf7 INT-2514 - Remove redundant cast in AutoCreateCandidatesCollector
Jira: https://jira.springsource.org/browse/INT-2514
2012-06-18 17:47:55 -04:00
Oleg Zhurakousky
750501d66c INT-2470 Add 'append to file' Capability
Add capability to append to a file, if it already exists, to File Outbound Channel Adapter.
The new attribute is 'append' and is mutually exclusive with 'temporary-file-suffix' since
when appending to a file we can no longer write to a temporary file and then rename it.

INT-2470 addressed PR comments

INT-2470 PR Comments

INT-2470 polishing

changed logic behind File copy when one file needs to be appended into another

INT-2470 added WhileLockedProcessor

INT-2470 polishing
2012-06-14 18:36:02 -04:00
Gary Russell
9bc9867d31 INT-1849/INT-2606 Pseudo Transactional Message Src
Initial commit.

Tested with POP3 and IMAP (James) with Sample app.

Essentially moved all the flagging and deleting code
from receive() to closeContextAfterSuccess().

For non-transactional cases, this new method is
called immediately after receiving the message(s),
essentially working as before.

When run from a <transactional/> poller it is
called using TransactionSynchronization after
the transaction commits.

This behavior can be changed by setting
'symchronized="false"' on the poller, which
removes the synchronization and the update
is called immediately after the receive().

Polishing

PR Comments

Update Reference
2012-06-14 16:55:53 -04:00
Oleg Zhurakousky
2b3e2614a1 INT-2594 Add BF support to Correlation Strategy
Add BeanFactory support to
ExpressionEvaluatingCorrelationStrategy

INT-2594 addressed PR comments
2012-06-13 15:51:49 -04:00
Gary Russell
517f632ce1 Revert "INT-2594 added BF support to ExpressionEvaluatingCorrelationStrategy"
This reverts commit 8758aec3d1.

Missed a second commit
2012-06-13 15:40:11 -04:00
Oleg Zhurakousky
8758aec3d1 INT-2594 added BF support to ExpressionEvaluatingCorrelationStrategy 2012-06-13 15:18:35 -04:00
Gunnar Hillert
9c5309c7e9 INT-2546 Move method PollerParser.configureTransactionAttributes to IntegrationNamespaceUtils
* Move method *PollerParser.configureTransactionAttributes* to *IntegrationNamespaceUtils*
* Remove method *configureTransactionAttributes* from class *JpaParserUtils*

For reference see: https://jira.springsource.org/browse/INT-2546
2012-06-12 00:41:45 -04:00
Oleg Zhurakousky
c377b82d8a INT-2518 addressed Resequencer with custom comparator
removed setComparator(..) method from ResequencingMessageGroupProcessor, fixed tests. More details as to why are available in JIRA https://jira.springsource.org/browse/INT-2518
2012-06-06 10:08:05 -04:00
Gary Russell
e053932c5c INT-2592 Fix Memory Leak in SimpleMessageStore
Locks used to control access to a group of messages were
never removed from the collection.

Converted to use LockRegistry, which (by default) uses
a pool of reentrant locks, using the hashcode of the group id
as an index into the pool.

Given that the pool is fixed, there is nothing to remove, thus
avoiding the memory leak.

When used within AbstractCorrelatingMessageHandler, any
custom LockRegistry supplied will also be used by the message
store, thus allowing the user to increase or decrease the
size of the lock pool. The registry can not be changed
once the SimpleMessageGroup has been used.

Also, the ACMH had some protection to avoid setting the
LockRegistry more than once, but this did not protect
against the default lock registry being replaced after
it had been used. Added additional protection to avoid
this condition by setting lockRegistrySet to true in
onInit().

INT-2592 Polishing

PR Comments. Now, if a custom lock registry is required, it
must be supplied to both the ACMH and SMS.

INT-2592 polishing, fixed Javadoc in SMS
2012-06-01 13:09:43 -04:00
Gary Russell
59d7432eef INT-2417 Alias Endpoints with Generated Names
Handlers for consumer endpoints get a generated name
derived from the endpoint class name.

It is useful (for example for autowiring in tests)
to give the handlers a well-known name.

If the endpoint has an ID attribute, the handler
now gets a bean name of "<ID>.handler".
2012-05-17 16:10:02 -04:00
Oleg Zhurakousky
9656ee70f4 INT-2453 content-type and ObjectToJsonTransformer
Added 'content-type' functionality to ObjectToJsonTransformer

Added 'content-type' attribute to object-to-json-transformer element

Added parser and usage tests to ensure propper overrides
(see Mark's last comment here https://github.com/SpringSource/spring-integration/pull/409)

Applied required changes to Amqp module to work with standard 'content-type' header

INT-2453 polish based on PR comments

INT-2453 polished test

INT-2453 polished parser
2012-05-15 16:56:11 -04:00
Artem Bilan
45c429ee2b INT-2275: any outbound-channel-adapter in <chain>
Add re-init logic for nested chains
Add logic about nested element for AbstractChannelAdapterParser
Refactor of DefaultOutboundChannelAdapterParser
Test for non-last nested chain with some outbound-channel-adapter
Improve XSD for chain-type
Manual outbound-channel-adapter ability for chain
Integration tests for all outbound-channel-adapter within <chain>
Remove redundant 'return-value-required' attribute from <stored-proc-outbound-channel-adapter>
Add support 'expectReply' for FileWritingMessageHandler

INT-2275 polishing & refactor FileOutbound*Parser

HttpRequestExecutingMessageHandlerTests polishing

INT-2275: polishing JavaDoc
2012-05-14 12:41:39 -04:00
Gary Russell
0a12a496cc INT-2485 Orderly Shutdown
Initial commit - @ManagedOperation on IMBE

- can be invoked via JMX, <control-bus/>, or getting a reference to
the IMBE from the application context.

INT-2485 Updates After Review Comments (JIRA)

* Shutdown Schedulers first, and wait for them
* Add a force parameter, which overrides thread pool shutdown options
* Shutdown Sources/Channels after all thread pools have stopped
* Mark other components as OrderlyShutdownCapable (e.g. JMS/AMQP Listener containers) and shut them down first
* Wait for remaining time to allow for quiescence

Also
* remove TimeUnit parameter (not JMX-friendly); time limit is now always milliseconds
* If thread pools don't stop in time limit, force them down.

INT-2485 Handle Self-Destruction

Add shutdown-executor to IMBE.

When the shutdown was called on a Spring-Managed thread, the shutdown
was not clean because we timed out waiting for the current thread to
terminate. After that, we force terminated other components.

Now, by providing a dedicated Executor for the shutdown process, it
is used for the shutdown instead of the current thread. This Executor
is *not* shutdown.

It is not necessary to provide an Executor if the stopActiveComponents()
method is called on some other thread that is not involved in the
shutdown.

Also adds executor name to logs, when available.

INT-2485 Polishing

Fix MBean object name collision when running all tests.

INT-2485 Enable TCP Shutdown

Make TCP connection factories 'OrderlyShutdownCapable' so
they are stopped before schedulers/executors in order for
them to release any executor threads they are holding.

INT-2485 Polishing

Didn't need DirectFieldAccessor - scheduler and executor have
an accessor for the native ExecutorService.

Copyrights

INT-2485 Polishing

schemaLocation version.

INT-2485 PR Review Polishing
2012-05-10 08:10:00 -04:00
Oleg Zhurakousky
7d0dcf0805 INT-2508 Priority Channel FIFO
Fix a concurrency issue with the PriorityChannel by
introducing a private MessageWrapper; an implementation
of Message, to maintain the contract with the Comparator.

The MessageWrapper contains the original Message plus
an incremented sequence number, used as a tie-breaker,
to maintain FIFO semantics within priority.

Previously, the sequence number was added to, and removed
from, the headers of the original Message using a
DirectFieldAccessor.

This could cause concurrent modification
exceptions when it was removed.

INT-2508 polishing based on PR comments

INT-2508 Polish Whitespace
2012-05-09 13:50:08 -04:00
Artem Bilan
1a5275a1ad INT-2542: order attr. for logging-channel-adapter
Additional tests for LoggingChannelAdapterParser
2012-05-09 13:25:31 -04:00
Oleg Zhurakousky
e1274f3bb4 INT-2497
changed warning message to error in AbstractCorrelatingMessageHandlerParser when both beanRef and expression are present, re-enabled commented out test to verify the error
2012-05-08 16:54:41 -04:00
Gary Russell
411aa296a4 INT-1871 TCP CachingClientConnectionFactory
Pool based on algorithm used for spring-integration-file
CachingSessionFactory introduced by INT-2146. Refactored
that code to use the common SimplePool.

One difference to the previous implementation is the
ability to change the pool size dynamically.

If the size is reduced and more than the new size are
in use, items are closed as they are returned until
the pool size is as requested.

Initial commit.

Allow Pool Size Changes

Factor out Pool

Polishing

Pool Tests

Default forever

Javadocs, File

Polishing

INT-1871 PR Polishing

* Consistent/cleaner method names
* Track checkouts; reject release of 'foreign' objects.
* Add 'getAllocatedCount()'
2012-05-07 08:25:11 -04:00
Gary Russell
95cd202be6 INT-2536 Create 2.2 Schemas
Add 2.2 versions of module schemas.

JMX is already covered by an existing pull request.

INT-2536 Schema Check

Bump version for schema check in
AbstractIntegrationNamespaceHandler.

INT-2536 Remove Schema Versions

Some test config files had 2.1 versioned schemas.
2012-05-04 10:04:01 -04:00
Oleg Zhurakousky
aec1467b6b INT-2434 lower-cased ChannelInitializer bean name 2012-04-04 14:27:58 -04:00
Oleg Zhurakousky
458eac43da INT-2434 Fix How input-channels are auto-created
Channel creation logic for channels that are not explicitly defined but identified via an 'input-channel' attribute on the corresponding endpoint is now done by ChannelInitializer - an InitializingBean implementation.

This bean plays a role of pre-instantiator since it is instantiated and initialized as the very first bean of all SI beans using AbstractIntegrationNamespaceHandler

INT-2434-v3 polishing

INT-2434-v3 polishing, changed ChannelCreatingFactoryBean from BeanFactoryPostProcessor to BeanFactoryAware

INT-2434 polishing

fix the test

changed the default name of the CHANNEL_CREATOR_BEAN_NAME to a simple name

added additional test

changed ChannelCreatingFactoryBean from FactoryBean to InitializingBean and renamed it to ChannelInitializer

INT-2434 added test validating how automatic channel creation can be disabled

INT-2434 polished based on the latest PR comments

INT-2434-v3 polishing based on comments and discussions with @markfisher and @garyrussell. Added support for disabling aut-creatioin of channels

INT-2434-v3 polished based on @garyrussell last comments

INT-2434-v3 final polishing
2012-03-30 14:40:22 -04:00
Mark Fisher
a77e5dac5a Combined commit from Gary and Mark for INT-2451
Added bean resolver to ContentEnricher
INT-2451 Polishing - PR Review Comments

Disallow bean resolution in the name expression for content enricher
properties - the name expressions can only resolve to payload
properties. Value expressions can resolve to beans and bean properties.
2012-03-29 18:32:30 -04:00
Oleg Zhurakousky
5952934171 INT-2502-patch Tighten Mask Validation
Polishing and add tests.
2012-03-29 11:19:17 -04:00
Oleg Zhurakousky
4375cd9c8c INT-2502, INT-1117 Improve Group Locking
Add initial support for Global lock registry. Fix race condition described in INT-2502.

INT-2502 addressed PR comments by @garyrussell

INT-2502 polishing
2012-03-28 18:44:24 -04:00
Oleg Zhurakousky
fc31317aa4 INT-2396 Fix 'expression' Attribute Parsing
Ensure that 'expression*' attributes are parsed
by the AggregatorParser when 'ref' is used to
define the actual aggregator

INT-2396 polishing based on PR comments

INT-2396 changed parser error to warning
message as suggested by Mark.
Raised follow up JIRA for 2.2 to fix it back to error
2012-03-27 15:23:17 -04:00
Oleg Zhurakousky
5fd15d11e0 INT-2478a polished the test that broke the build 2012-03-27 14:13:58 -04:00
Oleg Zhurakousky
aeb7df2ad5 INT-2478 SimpleMessageStore and Sequence* Headers
Fix AbstractCorrelatingMessageHandler to ignore
Message Sequence information IF a custom release strategy is provided.

INT-2478 polishing based on PR comments.

Rename Test case.
2012-03-27 11:41:36 -04:00
Gary Russell
b6b4e25efc INT-2449 Fix PubSub Subscriber Accounting
PubSub channel subscriber accounting was incorrect; the counter
was not decremented when unsubscribing.

The handler count, reflecting the current number of subscriptions,
was maintained in the AbstractSubscribableChannel. The count really
belongs in the dispatcher and calls should be delegated to it, particularly
for a custom ASC, which might have a custom AbstractDispatcher.

However, it is possible (although perhaps rare) that someone
could implement a custom channel with a custom dispatcher that
is *not* a subclass of AbstractDispatcher.

Therefore, we now delegate to the dispatcher if we can, and
revert to a counter in the channel if we can't.

Also, the asymmetric accounting in this case is resolved; the
counter is decremented when a subscriber unsubscribes.

Polishing - factor out common code.
2012-03-24 17:32:32 -04:00
Gary Russell
f75dc53ab0 INT-2431 Improve 'Dispatcher Has No Subscribers'
Add channel name to MessageDeliveryException

'Dispatcher has no subscribers'.

In a large integration flow, it can be difficult to track
down which subscribable channel has no subscribers.

This commit adds to the message text in the form

    for channel someChannelName

to the exception message. For example:

    "Dispatcher has no subscribers for channel myChannel."

Also

    for amqp-channel someAmqpChannelName
    for jms-channel someJMSChannelName
    for redis-channel someJMSChannelName

INT-2431 Polishing

Make component type and name immutable once set to avoid
channels further down the stack frame claiming ownership.

INT-2431 Polishing

* PR Comments - use a new Exception type
* Add support for Redis
* Add WARN logs for AMQP/JMS pub-sub channels

INT-2431 Polishing

PR Comments: tighten up isPubSub field in AMQP-backed channel.

INT-2431 Polishing

Ensure channel name is not 'null' or empty string.
2012-03-23 09:50:01 -04:00
Artem Bilan
6c7f7c3eb0 INT-2439 PollerParser adviceChain.add(customBean)
Fix PollerParser#configureAdviceChain for adding 'customBeanDefinition' into 'adviceChain' List.
PollerParserTests: adding <tx:advice> as customElement into poller's <advice-chain>.

Commit is mostly parser tidy-up. The crux of the fix is to add the
missing call to adviceChain.add().
2012-03-13 11:22:54 -04:00