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 Casas
Messages: 58
Registered: November 2011
Location: Barcelona
Member

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: Sun Sep 21 18:11:03 GMT 2014

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

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