Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to restart session?
How to restart session? [message #1022836] Fri, 22 March 2013 16:05 Go to next message
Julia Kurde is currently offline Julia KurdeFriend
Messages: 91
Registered: November 2011
Location: Berlin, Germany
Member
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 17:23 Go to previous messageGo to next message
Markus  rüger is currently offline Markus rügerFriend
Messages: 369
Registered: July 2009
Senior Member
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 18:58 Go to previous messageGo to next message
Julia Kurde is currently offline Julia KurdeFriend
Messages: 91
Registered: November 2011
Location: Berlin, Germany
Member
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 08:54 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

> 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: Fri Apr 26 10:40:27 GMT 2024

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

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

Back to the top