Commit Graph

173 Commits

Author SHA1 Message Date
Gary Russell
49a6079d1a INT-2683 Add Reply Listener Container Option
INT-2683 Tests

Expanded JMS Gateway Tests

INT-2683 First commit

Listener Container Option for Replies

INT-2683 Remove no correlation-key Option

INT-2863 Support DestName and Temp Dest

INT-2683 Add back Support No CorrelationKey

INT-2683 Fix Tests

INT-2683 Polishing

Fallback if no correlationKey and fixed reply queue.

INT-2683 Polishing

Change from SMLC to DMLC

INT-2683 Polishing

Since we changed to DMLC, we can now remove the check for
SingleConnectionFactory.

INT-2683 <reply-listener/> Namespace Support

Add <reply-listener/> subelement to JMS Outbound Gateway.
2012-09-20 21:22:11 -04:00
Gary Russell
281c985da9 INT-2740 MessageSelector w/ Pollable JMS Channel
Previously, the 'selector' attribute was ignored when
a JMS Channel was pollable rather than message-driven.

Add support for MessageSelector to PollableJmsChannel.
2012-09-07 14:09:33 -04:00
Gary Russell
273bba370b INT-2730 Move OrderlyShutDownAware Interface
Move from core to context.
2012-08-31 17:57:33 -04:00
Oleg Zhurakousky
a333d33112 Revert "INT-2683, INT-2684 JmsOutboundGateway improvements"
This reverts commit f127dc2d34.
2012-08-21 11:28:13 -04:00
Oleg Zhurakousky
f127dc2d34 INT-2683, INT-2684 JmsOutboundGateway improvements
Added support for caching reply consumers when reply queue is Temporary Queue
Added support for reuse of temporary Reply queues in the JmsOutboundGateway

Added check in ChannelPublishingJmsMessageListener to catch IllegalAccessExceptions
when Session is closed

INT-2683 first round of PR coomments

INT-2683 polish

INT-2683 polishing
code restructuring, other optimizations

INT-2683 modified 'messageCorrelationId' generation logic to be the object identity of the jmsReques as its 3-4 times fatster then String.valueOf(System.currentTimeMillis() +
-                String.valueOf(System.nanoTime())

INT-2683
polished JOG to ensure that it properly manages the correlation id when used in the pipeline
added various combinations of pipeline tests

INT-2683 added copyrights to tests

INT-2683 polishing

INT-2683 polishing

INT-2683 added more pipeline tests

INT-2683 added more tests

INT-2683 polishing test

INT-2683 Polishing

INT-2683 More Pipeline Tests

INT-2683 Don't Propagate CorrelationID

Message correlation is internal to the JOG. Cannot
propagate an existing correlation id because some
downstream JOG may end up correlating (selecting) on
the same key.

INT-2683 Polishing

Fix whitespace - replace spaces with tabs.

INT-2683 polishing
reverted 2.1 schema back to its master state, fixed the typo in the test
2012-08-17 17:09:21 -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
Gunnar Hillert
b07abcd30c INT-2262 - Add reply-timeout to Outbound Gateways
For reference see: https://jira.springsource.org/browse/INT-2262

Add reply-timeout attribute to:

* Amqp Outbound Gateway
* File Outbound Gateway
* Ftp Outbound Gateway
* Sftp Outbound Gateway
* Ws Outbound Gateway

Update Schema Documentation for reply-timeout attribute:

* spring-integration-jpa-2.2.xsd
* spring-integration-jms-2.2.xsd
* spring-integration-jdbc-2.2.xsd
* spring-integration-ip-2.2.xsd
* spring-integration-http-2.2.xsd

Update the *What's new in Spring Integration 2.2* section in the reference manual

INT-2262 - Code Review

* Update copyright year for affected files
* Update author tags for affected files
2012-07-16 14:37:16 -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
Gunnar Hillert
39ee7a4429 INT-2657 - Spelling Error in AbstractMailReceiver
* Also fixed spelling error in *PollableJmsChannelTests*
2012-07-10 22:55:44 -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
f9741d7ef3 INT-2523 Add QOS Attributes on JMS Channel
The Factory Bean already supported the attributes but
the namespace did not.

Also, the priority was fixed (if set via the factory bean).

Add QOS attributes to schema/parser; add use of
DynamicJmsTemplateProperties to allow override of configured
priority with the priority header (in the same way as the
outbound endpoints).
2012-06-19 11:14:59 -04:00
Gary Russell
e6bac96217 INT-2540 AbstractJmsChannel wasn't Marked Abstract
Class should have been abstract. In any case,
it could not be used in any meaningful way
as a concrete class so changing it would
not represent a breaking change.
2012-06-07 12:51:53 -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
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
Gary Russell
bd2fd0e1be INT-2471 Improve Run Time For JMS Tests
Mostly due to auto-started adapters in parser tests.

Reduced gradle run time from several minutes down to < 1 min.

INT-2471 Polishing

Remove sysout.
2012-03-24 16:27:41 -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
Gary Russell
6f2dcab4b2 INT-2414 Error When container-class Supplied
JMS backed channels can have container-type and
container-class. Parser rejected container-class because
the schema has a default for container-type.

Both attributes are allowed; user must set container-type
appropriately (based on the superclass of the custom class)
when container-class is provided.
2012-01-24 12:33:51 -05:00
Gary Russell
0899768d1e INT-2406 Add JMSTimestamp Property To Headers
Inbound JMSTimestamp property is now mapped to header
jms_timestamp.
2012-01-23 10:22:30 -05:00
Gary Russell
f76f63f23a NT-2400 Fix tool:expected-type Classes
* MessageChannel was moved from core to the base package.
* ChannelResolver moved from core to support.
* TcpConnectionInterceptorFactoryChain was incorrect.
2012-01-13 13:21:41 -05:00
Gary Russell
b59ee8e352 INT-2369 package-info IP
INT-2360 package-info Core

INT-2361 package-info AMQP

INT-2362 package-info Event

INT-2363 package-info Feed

INT-2364 package-info File

INT-2365 INT-2380 package-info (S)FTP

INT-2366 package-info GemFire

INT-2367 package-info Groovy

INT-2368 package-info Http

INT-2378 package-info Scripting

INT-2372 package-info JMS
2012-01-05 14:42:24 -05:00
Oleg Zhurakousky
0137a3023f INT-2327-v2 polishing
fixed the initialization routine to perform only once
2011-12-21 12:50:15 -05:00
Oleg Zhurakousky
00448ebfcd INT-2327 added Null check to SubscribableJmsChannel
INT-2327 polishing

INT-2327 polishing
2011-12-21 10:59:09 -05:00
Mark Fisher
95d6ef0f90 INT-1868 using generic JMS 1.1 API only 2011-12-09 15:25:51 -05:00
Oleg Zhurakousky
43f60dae08 INT-2238 interim commit
INT-2238 fixing warning comments

INT-2238 fixing warning comments

INT-2238 fixing warning comments
2011-11-22 21:10:32 -05:00
Mark Fisher
0a7426287f fallback if proxy does not support Queue* types 2011-10-10 16:39:11 -04:00
Mark Fisher
4a9d09dfed versionless schemas for jms module 2011-10-10 13:02:34 -04:00
Oleg Zhurakousky
46114ab4cb INT-2109 updated JMS schema documentation to document DMLC attributes 2011-09-13 16:30:46 -04:00
Mark Fisher
9f59001230 removed deprecated trigger sub-elements non-core 2011-08-31 12:54:22 -04:00
Mark Fisher
cd9b78a020 INT-1943 re-updated 2.0 schema 2011-08-31 05:11:12 -04:00
Mark Fisher
229b6bfb9f maintaining reply-timeout for outbound-gateway
INT-1943: the underlying property is "sendTimeout", but the attribute exposed
  on the element will remain 'reply-timeout' since most outbound gateways have
  this terminology exposed - for sending of the reply to the reply-channel
2011-08-31 05:07:24 -04:00
Mark Fisher
f02cdd2a3c INT-1943 update the 2.0 schema 2011-08-30 22:58:22 -04:00
Mark Fisher
9dd7053112 fixed jms outbound-gateway timeout attributes 2011-08-30 22:31:20 -04:00
Mark Fisher
49ee745e6f request destination exprs for outbound-gateway 2011-08-30 19:21:37 -04:00
Mark Fisher
d3f5c90348 destination expr for outbound-channel-adapter 2011-08-30 17:59:05 -04:00
Mark Fisher
9b6d3cd838 properly support request and reply pubSubDomain 2011-08-29 17:40:50 -04:00
Mark Fisher
aa0e8a335f added support for durable subscription settings 2011-08-22 10:53:48 -04:00
Oleg Zhurakousky
935cd01d07 INT-1512 changed the type of ID attribute to be xsd:string in all related 2.1 schema files 2011-08-08 23:34:12 -04:00
Mark Fisher
3e71b5a83b INT-2004 added 2.1 versions of all XML schemas and adjusted spring.schemas files accordingly 2011-08-05 11:07:20 -04:00
Oleg Zhurakousky
8ae6d7b842 INT-1980 added schema and reference documentation related to the 'pub-sub-domain' attribute of JMS module 2011-07-18 09:01:23 -04:00
Oleg Zhurakousky
e62563bfec INT-1948 added support for 'cache-level' attribute to the namespace-based configuration of JMS Message Driven Channel adapter and JMS Inbound Gateway 2011-07-06 20:40:03 -04:00
Oleg Zhurakousky
8e20d845bf INT-1910 fixed ChannelPublishingJmsMessageListener to react to Lifecycle events of JmsMessageDrivenEndpoint 2011-05-19 17:37:44 -04:00
Oleg Zhurakousky
52c0ceaf4c INT-1886 polishing 2011-05-04 12:30:38 -04:00
Oleg Zhurakousky
b0cf5c0b47 INT-1886 fixed the refactoring mistake where send() was changed to sendAndReceive() 2011-05-04 12:10:13 -04:00
Oleg Zhurakousky
d26159e1a6 INT-1886 refactored ChannelPublishingJmsMessageListener to delegate to MessagingGatewaySupport instead of subclassing it 2011-05-04 12:04:15 -04:00
Oleg Zhurakousky
09d2e2eeb0 INT-1875 added documentation about JMS Header Mapper 2011-04-29 16:55:05 -04:00
Mark Fisher
b59bdc0d70 INT-1795 the default receiveTimeout for a JmsTemplate used by an 'inbound-channel-adapter' (polling consumer) is now set to: JmsTemplate.RECEIVE_TIMEOUT_NO_WAIT. The value can be explicitly overridden via the 'receive-timeout' attribute 2011-04-29 14:27:51 -04:00
Mark Fisher
54e7a7b994 INT-1880 added support for 'reply-channel' attribute on JMS inbound-gateway elements 2011-04-26 09:57:14 -04:00
Oleg Zhurakousky
c7cdb5379b polishing, removed unused import 2011-04-15 18:10:37 -04:00
Oleg Zhurakousky
1d05b013f9 INT-1851 added support for mapping JMS properties of the jms reply message to SI Message headers 2011-04-15 18:08:25 -04:00