Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Default Realm Is Not Current?(Seeing Wierd Realm Behavior)
Default Realm Is Not Current? [message #1728198] Thu, 31 March 2016 19:49 Go to next message
Ray Jantz is currently offline Ray JantzFriend
Messages: 5
Registered: March 2016
Junior Member
I am trying to use RAP in a multi-user web app and am getting the message "assertion failed: Getter called outside realm of observable org.eclipse.core.databinding.observable.list.WritableList@393d3e1d" from ObservableTracker.java. It looks likes the code fails in this way when the realm of the observable is not the current (! realm.isCurrent()), so I used Realm.runWithDefault to force the realm to be correct, but I still got the error. So I addd a print statement just before the call to ViewerSupport.bind (where this is happening) to display the defalt realm (Realm.getDefault()), the realm of the observable, and the value Realm.getDefault().isCurrent(). It showed that the default realm and the observable realm agree, but Realm.getDefault().isCurrent() is false! How can this be? And if it's possible for the default realm to not be current, how can anyone ever get an application that uses Realms working?
Re: Default Realm Is Not Current? [message #1728276 is a reply to message #1728198] Fri, 01 April 2016 14:23 Go to previous messageGo to next message
Markus Knauer is currently offline Markus KnauerFriend
Messages: 179
Registered: July 2009
Senior Member

Hi Ray,

you are right, as long as you are running the RAP application in JEE mode it is a bit tricky to set up databinding with a working realm instance. The following bug report has some information about how to circumvent the problems:

Bug 389040 - Databinding support in the JEE mode
https://bugs.eclipse.org/bugs/show_bug.cgi?id=389040

Hope that helps...

Regards,
Markus


--

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Default Realm Is Not Current? [message #1728287 is a reply to message #1728276] Fri, 01 April 2016 16:07 Go to previous message
Ray Jantz is currently offline Ray JantzFriend
Messages: 5
Registered: March 2016
Junior Member
Hi,
I have looked at this report before and tried a variation of it, which sort of worked. I now realize that the crux of my problem is that I want to have a single instance of my model that can be seen by multiple users, each with their own Display, It looks like an observable is associated with a single Realm, which in turn is associated with a Display, so I think for the use case I am talking about, you would need a way to associate an observable with multiple Realms, which are then associated with their respective Displays. Or you would need a way for multiple Displays to all be in the same Realm as the one instance of the model. I don't see a way to do either. Am I missing something?
Previous Topic:Single sourcing
Next Topic:Problem on Junit testing with Rap 3.1
Goto Forum:
  


Current Time: Fri Apr 26 14:07:41 GMT 2024

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

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

Back to the top