Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JBIDE-14800 - livereload seem to not clean up/close listening on for jetty server on eclipse restart #51

Merged
merged 1 commit into from
Jul 4, 2013

Conversation

xcoulon
Copy link
Member

@xcoulon xcoulon commented Jul 4, 2013

Stopping all servers while the JBossLiveReloadCore bundle is shut down. This works for both Workbench shutdown and restart, as opposed to IWorkbenchListener which is only called when Workbench is shutdown, bot restarted

@xcoulon
Copy link
Member Author

xcoulon commented Jul 4, 2013

Biggest change is the JUnit test that triggers a Bundle.stop then restart it so that other tests in the suite won't fail ;-)

@@ -38,6 +41,10 @@ public void start(BundleContext context) throws Exception {
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
// stop all servers while the plugin is stopped
for(IServer liveReloadServer : WSTUtils.findLiveReloadServers()) {
WSTUtils.stop(liveReloadServer, 30, TimeUnit.SECONDS);
Copy link
Member

Choose a reason for hiding this comment

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

can't these throw exceptions ? shouldn't it be guarded to not prevent stop ?

Copy link
Member

Choose a reason for hiding this comment

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

and is 30 seconds really needed for jetty ?

…jetty server on eclipse restart

Stopping all servers while the JBossLiveReloadCore bundle is shut down. This works for both Workbench shutdown and restart,
as opposed to IWorkbenchListener which is only called when Workbench is shutdown, bot restarted
@maxandersen
Copy link
Member

looks good now +1

@xcoulon xcoulon merged commit 478da0b into jbosstools:master Jul 4, 2013
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.

None yet

2 participants