Bug 421153 - [e4] Need to support to restart OSGi-App from @PostContextCreate
Summary: [e4] Need to support to restart OSGi-App from @PostContextCreate
Status: RESOLVED FIXED
Alias: None
Product: Efxclipse
Classification: Technology
Component: Runtime (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 1.1.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 445451 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-06 07:55 EST by Thomas Schindl CLA
Modified: 2014-10-13 08:57 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schindl CLA 2013-11-06 07:55:03 EST
We currently don't support to restart an application from the lifecycle hook. We should allow to return:
* Boolean: false indicating shutdown
* Integer: 0/null indicating proceeding, any other value as the return code returned from the start-method
Comment 1 Christoph Keimel CLA 2014-09-30 03:57:09 EDT
I have just added Bug 445451 which adresses the same need with a different approach.
Comment 2 Christoph Keimel CLA 2014-09-30 04:06:43 EDT
I am thinking about trying this approach, as it has the benefit of introducing a lot less API than Bug 445451, but I am missing the possibility to also support a "restart with a cleared persisted state", as you would need it after an update.

What do you think about returning an enum like this:
LifecycleRV { CONTINUE, SHUTDOWN, RESTART, RESTART_CLEAR_STATE }
Comment 3 Christoph Keimel CLA 2014-09-30 04:55:46 EDT
Implementation proposal:
https://git.eclipse.org/r/34102
Comment 4 Christoph Keimel CLA 2014-10-13 08:15:59 EDT
*** Bug 445451 has been marked as a duplicate of this bug. ***
Comment 5 Thomas Schindl CLA 2014-10-13 08:17:14 EDT
pushed with http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/commit/?id=8b48d270d13408e11d91558b4af726df6f122e04 as noted on the review showing the useage at the wiki would be a great addition.
Comment 7 Thomas Schindl CLA 2014-10-13 08:44:08 EDT
Very good - we should also document the Boolean return type - IIRC this is also an enhancement against the SWT version which does NOT support this!
Comment 8 Christoph Keimel CLA 2014-10-13 08:57:50 EDT
Ok. I extended the wiki to cover this.