Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP Launcher: how to control jetty shut down(Need to write code when jetty is shut down)
RAP Launcher: how to control jetty shut down [message #1700759] Mon, 06 July 2015 16:14 Go to next message
Eclipse UserFriend
Hello

I followed the tutorial "Using the RAP Launcher" on this page https://www.eclipse.org/rap/developers-guide/devguide.php?topic=launcher.html&version=3.0 to launch my application in Eclipse.

I need to have some logic when jetty is shut down. My application is created as a plugin project. It has an Activator class and there is no servlet configuration or web.xml. Can I ask where should I put the logic that will be executed when jetty is shut down? Thank you very much for your time and help.

Tass
Re: RAP Launcher: how to control jetty shut down [message #1700823 is a reply to message #1700759] Tue, 07 July 2015 08:54 Go to previous messageGo to next message
Eclipse UserFriend
If you're interested in Jetty shutdown, this would be a question for the
Jetty folks, I don't have an answer.

If your logic is somehow related to the application, an
ApplicationContextListener [1] may be appropriate.

Regards,
Ralf

[1]
http://download.eclipse.org/rt/rap/doc/3.0/guide/reference/api/org/eclipse/rap/rwt/service/ApplicationContext.html#addApplicationContextListener%28org.eclipse.rap.rwt.service.ApplicationContextListener%29

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP Launcher: how to control jetty shut down [message #1700855 is a reply to message #1700823] Tue, 07 July 2015 11:58 Go to previous messageGo to next message
Eclipse UserFriend
Hello Ralf

Thank you very much for your help. I tried with ApplicationContextListener and it worked. Can I ask you one more question? If I deploy the project as the osgi bundle then method beforeDestroy() is called when bundle is stopped. If I work in the development environment (Eclipse Luna for RCP and RAP), when I launch the RAP application and then stop it by clicking the red button on Console view, method beforeDestroy() is not called. Can I ask is there something that I need to configure the development environment? Thank you very much for your time and help.

Tass
Re: RAP Launcher: how to control jetty shut down [message #1701030 is a reply to message #1700855] Wed, 08 July 2015 15:02 Go to previous message
Eclipse UserFriend
Got this. The stop button on the Eclipse console view terminates the launched osgi framework and thus the Activator's stop() method is not called. To trigger the beforeDestroy() method in development environment, just input "stop bundle_number" in the launched osgi framework on console view .

Tass
Previous Topic:Downloading several files to the same client directory
Next Topic:[ANN] RAP on e4 has been updated to RAP 3.0 and Mars
Goto Forum:
  


Current Time: Tue Jul 08 03:51:18 EDT 2025

Powered by FUDForum. Page generated in 0.49404 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top