New RWT session on browser refresh [message #956865] |
Wed, 24 October 2012 21:30 |
Karl Hönninger 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 |
Ivan Furnadjiev Messages: 2429 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/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03837 seconds