Commit Graph

91 Commits

Author SHA1 Message Date
Gary Russell
e822bfd908 INT-2823 Add QueueChannelOperations
Operations on QueueChannel (clear, getQueueSize etc) are not available
when the IntegrationMBeanExporter is configured because they
are not declared on the PollableChannel interface.

Add an additional interface QueueChannelOperations.

The proxy proxies all interfaces so users can cast the
proxy to QueueChannelOperations to use its methods.
2013-02-12 15:05:01 -05:00
Gary Russell
d28fefc884 INT-2487 Object Name Patterns for Notifications
Permit the specification of an ObjectName pattern in
NotificationListeningMessageProducer.

Permit a collection of ObjectNames (patterns).

INT-2487 Polishing

Use varargs and a SpEL Reference instead of 2 setters.

Log an error if no MBeans matching pattern(s).

INT-2487 Polishing: PR Review Comments

Add patterns to ERROR log when no MBean(s) found.

Add doc to schema and reference.
2012-09-07 08:07:36 -04:00
Gary Russell
273bba370b INT-2730 Move OrderlyShutDownAware Interface
Move from core to context.
2012-08-31 17:57:33 -04:00
Gunnar Hillert
dad4eac9ac INT-2710 - Remove hard-coded schema references
For reference see: https://jira.springsource.org/browse/INT-2710
2012-08-28 17:08:43 -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
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
c63141f6e0 INT-2665 JMX Endpoints And Remote MBeanServer
JMX endpoints need a reference to an MBeanServer. The MBeanServer
is a sub-interface of MBeanServerConnection.

When connecting to a remote MBeanServer, the server is an
instanceof MBeanServerConnection, not MBeanServer.

Change the Endpoints to get a reference to an MBeanServerConnection.

Add IOException catch clauses where necessary.
2012-07-19 13:04:04 -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
Artem Bilan
5bc41bc60b INT-1029: Support for outbound-gateways in chain
XSD refactoring: remove use="required" from 'request-channel' attribute of all 'outbound-gateways'
Tests for all 'outbound-gateways' inside the <chain>
2012-06-07 13:20:56 -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
864a4ef291 INT-2415 MBean Name Collisions in Tests
JMX Tests failed due to InstanceAlreadyExistsException; name
collisions between MBeans registered in multiple tests.

Adds a domain to the new tests added to fix INT-2413 to
force unique MBean names.
2012-01-23 11:52:43 -05:00
Gary Russell
b899595e01 INT-2413 <int-jmx:mbean-export/> And <control-bus>
When an AbstractMappingMessageRouter is included in an
ApplicationContext that also has an <int-jmx:mbean-exporter/>,
the @ManagedOperations (set and remove mapping) are no longer
visible to the <control-bus/>.

Adds these methods to a new interface MappingMessageRouterManagement,
thus making them available on the proxy that the MBean exporter
creates.
2012-01-23 10:34:58 -05:00
Gary Russell
292aa90599 INT-2404 Fix Auto-Created Channel; Event, TCP, UDP
The AbstractChannelAdapterParser creates an implicit DirectChannel
if the adapter has no 'channel' attribute.

The Event, TCP, and UDP channel adapter parsers did not bind
this channel to the adapter and AC initialization failed with
'outputChannel is required'.

Further, the event schema marked the channel as being 'required',
precluding this feature.

INT-2407 Remove Channel use="required"

Parsers automatically generate the channel when none is provided.

- JMX
- JDBC
- SFTP
- Redis
- Feed
- XMPP
- Mail
- FTP
- HTTP
2012-01-23 10:12:34 -05:00
Oleg Zhurakousky
03754b917a INT-2307
fixed NPE due to the missing class name from BeanDefinition
2011-12-20 16:23:14 -05:00
Mark Fisher
5805528faa removing warnings 2011-12-19 16:38:48 -05:00
Artem Bilan
869bcd5d36 INT-2188 and INT-2165
add fail test for HeaderEnricherSupport

  more flexible and readable parsing for sub-elements of <si:header>
2011-11-10 16:59:43 -05:00
Oleg Zhurakousky
99369c90d2 JMX_test_fix 2011-10-25 12:44:52 -05:00
Oleg Zhurakousky
ddeab16394 INT-2182 interim
INT-2182 interim

INT-2182 work in progress

INT-2182 Refctored MessageGroupQueue and related classes
- created MGS.pollMessageFromGroup(groupId)
- removed MARKED messages concept
- renamed UNMARKED to just Messages
- removed keepReleasedMessages attribute
- refactored JdbcMessageStore to NOT store Messages that belong to a MessageGroup in the MessageGroup table, only relationship
- provided implementation of pollMessageFromGroup method in JdbcMessageStore
- polished tests

INT-2182 refactored MongoDB support to reflect changes to MGQ

INT-2182 added Gemfire support for polling

INT-2182 added Redis support

INT-2182 polishing
removed syncronized blocks from SMG, added availablePermits() method to UpperBound, polished JdbcMessageStore

INT-2182 polishing

INT-2182 polishing

INT-2182 polishing

INT-2182 polishing

INT-2182 polishing

INT-2182 polishing based on PR comments
2011-10-25 12:50:17 -04:00
Mark Fisher
23c566898b versionless schemas for jmx module 2011-10-10 13:21:04 -04:00
Gary Russell
82f1cbc715 INT-1884 Fix Intermittent Test Failure
The test is verifying at least one more poll is executed after capturing
the initial poll count. However we only did one receive and relying on
luck that another poll happened in the interim. Changed to do 2 receives.
2011-08-13 13:45:03 -04:00
Gary Russell
56cefae41d INT-2040 Broken JMX Test
The change to a long return value for MessageCount broke a JMX test
(expected Integer got Long)
2011-08-13 11:04:54 -04:00
Dave Syer
225f4a3b84 INT-1806: fix duplicate MBeans 2011-05-04 17:54:58 +01:00
Dave Syer
2150b9b806 INT-1789: fix test for Java 5 (duh) 2011-05-03 17:28:53 +01:00
Dave Syer
41a8307266 INT-1789: Added 'managed-components' attribute to mbean-export 2011-05-03 17:06:06 +01:00
Oleg Zhurakousky
3956193bea INT-1817 changed attribute value from 'object-name-static-properties-ref' to 'object-name-static-properties' 2011-05-03 10:16:33 -04:00
Dave Syer
3441971540 INT-1806: added ManagedEndpoint for endpoints that are not message sources or message handlers 2011-05-03 10:04:15 +01:00
Dave Syer
9ae8180bcf INT-1830: add tests and workaround for MBeanExporters triggering eager loading 2011-03-10 16:09:01 +00:00
Oleg Zhurakousky
8b53fa1fc7 INT-1817 added namespace support for object-name-static-properties for IntegrationMBeanExporter 2011-03-09 17:13:13 -05:00
Oleg Zhurakousky
3f06998118 INT-1816 fixed the test to make sure that new MBean server instance is used for different tests, since it was cousing conflicts between the tests 2011-03-09 14:37:54 -05:00
Oleg Zhurakousky
1b3e7ce6e9 INT-1816 added support for multiple non-conflicting mbean exporters 2011-03-09 12:49:04 -05:00
Dave Syer
90946841b4 INT-1820: fix handler metrics 2011-02-28 14:33:13 +00:00
Dave Syer
ed63431977 INT-1675: add ignored test 2010-12-12 12:13:38 +00:00
Dave Syer
b528abcf68 INT-1675: work a bit harder to expose existing handlers if they are @ManagedResources 2010-12-11 08:49:09 +00:00
Dave Syer
e23e478e9e INT-1675: force initialization of other MBeanExporter instances before the integration monitor components are created 2010-12-11 08:49:08 +00:00
Dave Syer
c293edc7fa INT-1675: add illegal bean id check for clash with core mbean exporter 2010-12-11 08:49:07 +00:00
Dave Syer
4b4a6fdb94 Tweak test to defeat slow CI again 2010-11-10 09:26:34 +00:00
Dave Syer
941b1127d1 INT-1561: add counters to message stores 2010-11-10 09:26:34 +00:00
Oleg Zhurakousky
1278666ed7 INT-1596, fixed the broken links as well as all warnings 2010-11-09 12:17:45 -05:00
Dave Syer
bd1373ecff INT-1464: Check priority channel registration 2010-11-09 10:44:16 +00:00
Dave Syer
14cb9c8687 Change tolerance in test to defeat slow CI build 2010-11-09 09:19:35 +00:00
Dave Syer
26bd68f867 Fix compilation error 2010-10-25 11:11:05 -07:00
Dave Syer
473b8fa96d INT-1507: remove control bus from JMX XSD 2010-10-25 10:58:20 -07:00
Dave Syer
f51a9a10d7 INT-1537: add another integration test 2010-10-22 15:32:45 -05:00
Iwein Fuld
064b86b29c QUALITY: moved ControlBus to avoid cyclic dependency 2010-10-21 18:08:20 +02:00
Mark Fisher
b265312903 INT-1494 switched order of poller and inner bean (need to determine how to make XSD more flexible) 2010-10-17 12:24:07 -04:00
Dave Syer
4a8984bc0a remove System.err reference 2010-10-13 08:41:49 -07:00
Dave Syer
f69a178c1f JMX: remove duplicate annotations 2010-10-13 08:17:29 -07:00
Dave Syer
b4d9366dfb INT-1508: add reset() 2010-10-12 15:18:29 -07:00