coherence-community / oracle-bedrock

Oracle Bedrock
Other
55 stars 31 forks source link

Introduce the ability close a JavaApplication gracefully and ungracefully #194

Closed brianoliver closed 9 years ago

brianoliver commented 9 years ago

There are several ways we can close a Java-based Application.

  1. Attempting to close/destroy/exit the process using something like Process.close()

  2. Submitting a RemoteRunnable that does System.exit(exitCode), which should be the same as #1

  3. Submitting a RemoteRunnable that performs a System.halt(exitCode).

We currently do #1, but we should also offer to do #2 and #3 as options with an overloaded JavaApplication.close(approach, exitCode).

This is somewhat related to the closed issue #7

brianoliver commented 9 years ago

@brianoliver said: Instead of multiple methods we should:

  1. Refactor/introduce Application.close(Option... options) to replace Application.close()

This will allow any type of application to have customized close options. This will be especially useful for VirtualizedPlatforms which have a range of shutdown/close strategies.

  1. Introduce JavaApplication.CloseOption that will allow specific processing for a JavaApplication. eg: calling either System.exit() or Runtime.halt()

  2. Introduce a CoherenceMember.CloseOption (extending the JavaApplication.CloseOption) that will allow CacheFactory.shutdown() in addition to System.exit() or Runtime.halt() approaches.

brianoliver commented 9 years ago

@brianoliver said: Introduced ApplicationClosingBehavior Option and the new Application.close(Option...) method.

brianoliver commented 8 years ago

This issue was imported from JIRA ORACLETOOLS-194

brianoliver commented 9 years ago

Reported by @brianoliver

brianoliver commented 9 years ago

Marked as fixed by @brianoliver on Wednesday, November 19th 2014, 11:30:36 pm