Commit Graph

74 Commits

Author SHA1 Message Date
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
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
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
Gary Russell
89cdef7a90 INT-2373 package-info JMX
INT-2374 package-info Mail

INT-2375 package-info MongoDB

INT-2376 package-info Redis

INT-2377 package-info RMI

INT-2379 package-info Security

INT-2381 package-info Stream
2012-01-05 15:29:48 -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
Oleg Zhurakousky
a44d150009 INT-2323
made changes based on Sonar suggestions

added optional rome dependency to HTTP module
2011-12-20 12:12:20 -05:00
Gary Russell
cfc37616e5 INT-2313 Avoid Naming Conflicts With Mutliple Ctx
If multiple application contexts exist in the same JVM, where
managed beans exist with the same name, InstanceAlreadyExistsExceptions
could result.

1. Change int-jmx MBean exporter parser to ensure the exporter itself
has a unique name within the JVM.
2. When the IMBE exports Integration components for monitoring, where
the component itself is already an MBean, add domain and object name
static properties configured in the MBean exporter.
3. Add tests to load the same ac a second time to ensure no naming
conflicts arise.
2011-12-19 12:42:16 -05:00
Oleg Zhurakousky
1a56747a8a INT-2307
added MBeanExporterHelper to avoid conflicts with core MBeanExporter

INT-2307 polishing

INT-2307 polishing
2011-12-19 12:42:16 -05:00
Mark Fisher
0b8a8a15c1 simplified exception message 2011-05-06 12:32:39 -04:00
Dave Syer
225f4a3b84 INT-1806: fix duplicate MBeans 2011-05-04 17:54:58 +01:00
Dave Syer
41a8307266 INT-1789: Added 'managed-components' attribute to mbean-export 2011-05-03 17:06:06 +01:00
Oleg Zhurakousky
ea469ca887 INT-1817 polishing 2011-05-03 10:22:09 -04: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
f82c40fd3a INT-1816 chahnged NotificationPublishingMessageHandler to select the IntegrationMBeanExporter over MBeanExporter if available 2011-03-10 10:28:08 -05:00
Oleg Zhurakousky
de8ff948e7 INT-1816 chahnged NotificationPublishingMessageHandler to select the first available MBeanExporter instance 2011-03-10 10:02:35 -05: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
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
Mark Fisher
9a6d20d5b3 polishing 2010-12-16 16:19:52 -05: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
Mark Fisher
b3547433fb polishing 2010-11-18 23:19:01 -05:00
Mark Fisher
f3e854b10c INT-1568 removed the MessageHeaders.PREFIX constant since it's no longer necessary. Also added @ManagedOperation to the IntegrationMBeanExporter's getChannelSendRate(..) method. 2010-11-18 00:03:58 -05:00
Oleg Zhurakousky
67b26da0e0 polishing removed @Overides as well as fixed warnings in JMS and JMX 2010-11-16 16:11:19 -05:00
Mark Fisher
2b849f6747 removed SimpleMessageMapper, AttributePollingMessageSource now extends AbstractMessageSource 2010-11-12 18:00:49 -05:00
Dave Syer
e617de54c8 INT-1420: add units to metric descriptions 2010-11-12 09:27:13 +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
b9dbb20982 INT-1497: remove object name map in JMX 2010-11-09 11:14:30 +00:00
Mark Fisher
1e9c3c6a8d INT-1528 IntegrationNamespaceUtils.parseInnerHandlerDefinition(..) no longer registers the inner bean definition. Relatedly, all polling inbound adapter parsers now return BeanMetadataElement rather than a pre-registered bean's name (flexibility: RuntimeBeanReference, BeanDefintion, etc.) 2010-10-28 15:32:20 -04:00
Dave Syer
473b8fa96d INT-1507: remove control bus from JMX XSD 2010-10-25 10:58:20 -07:00
Iwein Fuld
064b86b29c QUALITY: moved ControlBus to avoid cyclic dependency 2010-10-21 18:08:20 +02:00
Mark Fisher
d0426d2147 INT-1489 removed SimpleMessageProducingHandlerMetrics 2010-10-15 16:22:41 -04: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
Dave Syer
7cfd0f4a55 INT-1503: *Monitor->*Metrics 2010-10-08 08:16:16 -07:00
Dave Syer
517aad3d69 INT-1503: *Monitor->*Metrics 2010-10-08 06:28:12 -07:00
Dave Syer
3ddc163217 INT-1502: implement doStop() 2010-10-07 16:49:19 -07:00
Dave Syer
71c7872270 INT-1495: change default domain to org.springframework.integration 2010-10-06 11:35:18 -07:00
Dave Syer
e2c1616d86 INT-1449: fix broken message count in message source monitor 2010-10-06 11:27:09 -07:00
Dave Syer
a21172fdab INT-1496: start optimistically with success rate 100% 2010-10-06 11:00:59 -07:00
Dave Syer
71f171b163 INT-1495: change domain= to default-deomain= 2010-10-06 10:56:36 -07:00
Dave Syer
84415d6f53 INT-1449: ensure mbeans only registered once for factory bean product 2010-10-06 10:25:58 -07:00
Dave Syer
cbf0242bd9 INT-1495: harmonise schema 2010-10-06 07:10:12 -07:00
Dave Syer
76d17bd187 Expose MessageSources and their polling endpoints to JMX 2010-10-05 15:47:18 -07:00
Dave Syer
07043a8875 INT-1489: inspect router to see if it is Advised
- Switch to proxy approach for handler monitor
- Add router mbean integration test
2010-10-05 14:22:49 -07:00
Dave Syer
8cf6e474d2 INT-1452: fix names and counts attributes
Add global counts to mbean exporter
2010-10-05 14:12:53 -07:00
Oleg Zhurakousky
b2533c0788 INT-1431, added SimpleMessageProducingHandlerMonitor to maintain semantics of some MessageHandlers also being MessageProducers 2010-09-15 13:50:16 -04:00