Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » New RWT session on browser refresh(On every browser refresh an new RWT session is created)
New RWT session on browser refresh [message #956865] Wed, 24 October 2012 21:30 Go to next message
Karl Hönninger is currently offline Karl HönningerFriend
Messages: 3
Registered: October 2012
Junior Member
Hello,

After migrating a SWT-Web-Framework to RWT I am now struggling with the situation that on every browser refresh a new session is created (which is not intended).

In the forum I found some older discussions regarding this issue but I am not sure what about the current state for the following setup:

- standalone RWT application
- OperationMode.SWT_COMPATIBILITY
- version 2.0.0.20121001-1623


Here is a test code to reproduce this behaviour:

package org.openxma.demo.ui;

import org.eclipse.rap.rwt.lifecycle.IEntryPoint;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

public class TestEntryPoint implements IEntryPoint {

public int createUI() {

Display display = new Display();
Shell shell = new Shell(display, SWT.NO_TRIM);
shell.setLayout(new FormLayout());

Text text = new Text(shell,SWT.BORDER);
FormData data = new FormData();
data.left = new FormAttachment(0,100,10);
data.top = new FormAttachment(0,100,10);
text.setLayoutData(data);

shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
return 0;
}
}



Can I somehow continue a session on a browser refresh or use the solution with exitConfirmation also in a standalone RWT application (OperationMode.SWT_COMPATIBILITY)?

Thank you,
best regards,
Karl
Re: New RWT session on browser refresh [message #957419 is a reply to message #956865] Thu, 25 October 2012 07:55 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2173
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Karl,
on browser refresh the HTTP session stays the same, but the session
store is cleared. There is already opened enhancement request to support
session recovery:
389949: Allow session recovery
https://bugs.eclipse.org/bugs/show_bug.cgi?id=389949
Best,
Ivan

On 10/25/2012 10:04 AM, Karl Hönninger wrote:
> Hello,
>
> After migrating a SWT-Web-Framework to RWT I am now struggling with
> the situation that on every browser refresh a new session is created
> (which is not intended).
>
> In the forum I found some older discussions regarding this issue but I
> am not sure what about the current state for the following setup:
>
> - standalone RWT application
> - OperationMode.SWT_COMPATIBILITY
> - version 2.0.0.20121001-1623
>
>
> Here is a test code to reproduce this behaviour:
>
> package org.openxma.demo.ui;
>
> import org.eclipse.rap.rwt.lifecycle.IEntryPoint;
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.layout.FormAttachment;
> import org.eclipse.swt.layout.FormData;
> import org.eclipse.swt.layout.FormLayout;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.widgets.Shell;
> import org.eclipse.swt.widgets.Text;
>
> public class TestEntryPoint implements IEntryPoint {
>
> public int createUI() {
>
> Display display = new Display();
> Shell shell = new Shell(display, SWT.NO_TRIM);
> shell.setLayout(new FormLayout());
>
> Text text = new Text(shell,SWT.BORDER);
> FormData data = new FormData();
> data.left = new FormAttachment(0,100,10);
> data.top = new FormAttachment(0,100,10);
> text.setLayoutData(data);
>
> shell.open();
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch()) {
> display.sleep();
> }
> }
> return 0;
> }
> }
>
>
>
> Can I somehow continue a session on a browser refresh or use the
> solution with exitConfirmation also in a standalone RWT application
> (OperationMode.SWT_COMPATIBILITY)?
>
> Thank you,
> best regards,
> Karl

--
Ivan Furnadjiev

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: New RWT session on browser refresh [message #967496 is a reply to message #957419] Thu, 01 November 2012 20:16 Go to previous message
Karl Hönninger is currently offline Karl HönningerFriend
Messages: 3
Registered: October 2012
Junior Member
Thank you Ivan,

I see, the clearing of the session store is the reason why the RWT application is reset on browser refresh.
So I will vote for the mentioned enhancement request.

Best regards,
Karl
Previous Topic:Deploy problem
Next Topic:Theming ToolItem DropDown
Goto Forum:
  


Current Time: Thu Dec 08 02:38:22 GMT 2016

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

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