Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 20:14 Go to next message
Tass Burrfoot is currently offline Tass BurrfootFriend
Messages: 19
Registered: April 2015
Junior Member
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 12:54 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

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 15:58 Go to previous messageGo to next message
Tass Burrfoot is currently offline Tass BurrfootFriend
Messages: 19
Registered: April 2015
Junior Member
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 19:02 Go to previous message
Tass Burrfoot is currently offline Tass BurrfootFriend
Messages: 19
Registered: April 2015
Junior Member
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: Fri Apr 26 08:11:02 GMT 2024

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

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

Back to the top