Skip to content

INT-2485 Orderly Shutdown#403

Closed
garyrussell wants to merge 4 commits into
spring-projects:masterfrom
garyrussell:INT-2485a
Closed

INT-2485 Orderly Shutdown#403
garyrussell wants to merge 4 commits into
spring-projects:masterfrom
garyrussell:INT-2485a

Conversation

@garyrussell

Copy link
Copy Markdown
Contributor

https://jira.springsource.org/browse/INT-2485

Initial commit - @ManagedOperation on IMBE

  • can be invoked via JMX, , 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

null check

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.
Didn't need DirectFieldAccessor - scheduler and executor have
an accessor for the native ExecutorService.

Copyrights
schemaLocation version.
@garyrussell

Copy link
Copy Markdown
Contributor Author

Pushed PR Review Fixes; see last commit

olegz added a commit to olegz/spring-integration that referenced this pull request May 10, 2012
@olegz olegz closed this May 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants