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 14: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: Thu Aug 28 05:30:48 EDT 2014

Powered by FUDForum. Page generated in 0.06946 seconds