Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Accessing SessionSingleton from thread
Accessing SessionSingleton from thread [message #804549] Wed, 22 February 2012 19:10
David Casas is currently offline David CasasFriend
Messages: 58
Registered: November 2011
Location: Barcelona

Hi guys,

I am trying to access my sessionsingleton from a background thread, the thing is I get a null value when I call Display.getDefault() method. Is it correct to do this?

final Display display = Display.getCurrent();
final Runnable runnable = new Runnable() {
	public void run() {
	UICallBack.runNonUIThreadWithFakeContext(display,new Runnable() {
	public void run() {
	NMSessionSingleton sessionSingleton = NMSessionSingleton.getInstance();
	... Do something ...								
new Thread(runnable).start();

What am I doing wrong??
Previous Topic:Textwidget not updated when deleting character in IE
Next Topic:Using Spring Roo with RAP
Goto Forum:

Current Time: Tue Feb 21 21:41:57 GMT 2017

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

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