Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to restart session?
How to restart session? [message #1022836] Fri, 22 March 2013 12:05 Go to next message
Eclipse UserFriend
Hi,

I'm trying to convert our (quite big) RCP application into an RAP application and it is already runnung Smile! But I'm facing the following problem:

In the RCP, when the application starts, all plugins and their classes are initialized, e.g. variables are given a value like
if (value == null) {value = newValue}
.

But in the RAP this only works the first time the application is startet. If it is stoped by File>Quit, all plugins are still alive. When the application is then started again by reloading the URL, all the old values are still there and the new ones will NOT be set!

Is there any way to start from a fresh session when the application is started?

Thanks for any advice!
Re: How to restart session? [message #1022871 is a reply to message #1022836] Fri, 22 March 2013 13:23 Go to previous messageGo to next message
Eclipse UserFriend
Julia Kurde <forums-noreply@xxxxxxxx> wrote:
> Hi,
>
> I'm trying to convert our (quite big) RCP application into an RAP
> application and it is already runnung :)! But I'm facing the following problem:
>
> In the RCP, when the application starts, all plugins and their classes
> are initialized, e.g. variables are given a value like if (value == null)
> {value = newValue}.
> But in the RAP this only works the first time the application is startet.
> If it is stoped by File>Quit, all plugins are still alive. When the
> application is then started again by reloading the URL, all the old
> values are still there and the new ones will NOT be set!
>
> Is there any way to start from a fresh session when the application is started?
>
> Thanks for any advice!

Hi Julia,

this is normal behavior if you store values in classes like plugin
activator or singletons since they are only created once the class loads or
plugin starts. A plugin is only started one time for all users.

If you want to store values for a user session you must use a session
singleton.

See
http://wiki.eclipse.org/RAP/FAQ%23What_is_a_Session_Singleton_and_how_can_I_implement_one

Regards,
Markus
Re: How to restart session? [message #1022900 is a reply to message #1022871] Fri, 22 March 2013 14:58 Go to previous messageGo to next message
Eclipse UserFriend
Hi Markus,

Thanks for this info! I'll need some time to get into it...

Just for anyone who can edit the RAP/FAQ pages: There is a broken link in the section "What is a Session Singleton and how can I implement one?"

The correct link is this, I guess:
http://eclipse.org/rap/developers-guide/devguide.php?topic=singletons.html&version=2.0
Re: How to restart session? [message #1039519 is a reply to message #1022900] Fri, 12 April 2013 04:54 Go to previous message
Eclipse UserFriend
> Just for anyone who can edit the RAP/FAQ pages: There is a broken link
> in the section "What is a Session Singleton and how can I implement one?"

Thanks for the pointer, I've fixed this link.

BTW, it's a public wiki, feel free to edit it yourself whenever you find
something that needs improvement.

Regards, Ralf

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:RAP 2.1 M1 is available
Next Topic:Weird situation - Icons disappearing
Goto Forum:
  


Current Time: Mon Jul 07 01:43:13 EDT 2025

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

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

Back to the top