Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [EMF/CDO] - Exact meaning of 'Resolve Proxies'
[EMF/CDO] - Exact meaning of 'Resolve Proxies' [message #1426452] Thu, 18 September 2014 19:37 Go to next message
Bernard Sarter is currently offline Bernard SarterFriend
Messages: 88
Registered: August 2011
Location: Paris, France
Member
Hello,

We have a EMF model, shared between various computers using CDO.

Up to now, the parameter 'Resolve Proxies" of all relations was set to 'True' (default value, when using Ecore Tool to design the model).

Now (model getting more complex, more users connected simultaneously), we observe from time to time error messages referring to an issue with a proxy ("List contains proxy elements").

I admit that I don't understand the meaning of this field 'Resolve Proxies'; I googled, and obviously, for a lot of people, the meaning seems to be so obvious, that I find nowhere a basic explanation of what this option does, and when (which kind of relation 1=>many, 0=>1, ...) it should be set to True or False ...

Could somebody please provide me with a hint or redirect me to a basic document 'Resolve Proxies for newbies" ?

Thanks,
Bernard.
Re: [EMF/CDO] - Exact meaning of 'Resolve Proxies' [message #1426784 is a reply to message #1426452] Fri, 19 September 2014 07:58 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30372
Registered: July 2009
Senior Member
Bernard,

Comments below.

On 18/09/2014 9:37 PM, Bernard SARTER wrote:
> Hello,
>
> We have a EMF model, shared between various computers using CDO.
>
> Up to now, the parameter 'Resolve Proxies" of all relations was set to
> 'True' (default value, when using Ecore Tool to design the model).
>
> Now (model getting more complex, more users connected simultaneously),
> we observe from time to time error messages referring to an issue with
> a proxy ("List contains proxy elements").
I'm not sure the nature of these error messages. Certainly the basic
EMF validator will produce error diagnostics for unresolved proxies, but
I'm not sure how this relates to CDO...
>
> I admit that I don't understand the meaning of this field 'Resolve
> Proxies'; I googled, and obviously, for a lot of people, the meaning
> seems to be so obvious, that I find nowhere a basic explanation of
> what this option does, and when (which kind of relation 1=>many, 0=>1,
> ...) it should be set to True or False ...
In general, true is a good default. It specifies that the referenced
object in an instance of a class with that reference may be contained in
a different resource, i.e., it specifies that cross resource references
are supported, which is generally the case, except for a few rare
exceptions.
>
> Could somebody please provide me with a hint or redirect me to a basic
> document 'Resolve Proxies for newbies" ?
There's the EMF book...

Again, I'm not sure how CDO deals with proxies, but in basic EMF, when a
resource is serialized, any reference to an EObject that's in a
different resource from the referencing object will be serialized as a
"proxy reference", i.e.,
<resource-uri>#<fragment-of-object-in-that-resource>. When that resource
is deserialized, an instance object is created and it carries that URI
as its proxy URI. When that object is accessed, and the reference
specifies resolveProxies true, the object is inspect to see if it's a
proxy and if so to retrieve its proxy URI. Ultimately
resourceSet.getEObject is called with that URI, and if that successfully
returns an EObject, it replaces the proxy and is returned instead of the
proxy. So generally you'll never see a proxy when using the generated
API, except when a proxy fails to resolve, in which case the proxy
itself will be return.

The most common reason proxies fail to resolve, is poor choice of
Resource URIs. I.e., a Resource's URI should generally be an absolute
URI, in which case the URIs in the serialization will generally be
relative URIs. Another reason proxy resolution might fail is because
the referenced object is no longer present in the resource...

I know CDO handles all this somewhat differently, so it's hard to
comment on the CDO aspect of your question...
>
> Thanks,
> Bernard.
Re: [EMF/CDO] - Exact meaning of 'Resolve Proxies' [message #1428863 is a reply to message #1426452] Mon, 22 September 2014 13:21 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
On 18-09-14 21:37, Bernard SARTER wrote:
> Hello,
>
> We have a EMF model, shared between various computers using CDO.
>
> Up to now, the parameter 'Resolve Proxies" of all relations was set to
> 'True' (default value, when using Ecore Tool to design the model).
>
> Now (model getting more complex, more users connected simultaneously),
> we observe from time to time error messages referring to an issue with a
> proxy ("List contains proxy elements").

Yes, but I think these could be Proxy Objects, (As in Java proxy
objects, see
http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Proxy.html

So, CDO uses these Proxy objects, as an CDOObject could be in memory but
not fully resolved from the server. I think this is a different thing,
than the EMF setting, 'Resolve Proxies'....(Please put me straight!)

I experienced proxy errors before, simply non-resolved objects.
See this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=394076

It went away with a newer build. What is your exact Exception?

>
> I admit that I don't understand the meaning of this field 'Resolve
> Proxies'; I googled, and obviously, for a lot of people, the meaning
> seems to be so obvious, that I find nowhere a basic explanation of what
> this option does, and when (which kind of relation 1=>many, 0=>1, ...)
> it should be set to True or False ...
>
> Could somebody please provide me with a hint or redirect me to a basic
> document 'Resolve Proxies for newbies" ?
>
> Thanks,
> Bernard.
Previous Topic:[CDO] MySQL database is broken after restart of CDO server
Next Topic:[CDO] IllegalMonitorStateException at commit when removing an element
Goto Forum:
  


Current Time: Sat Aug 24 06:36:26 GMT 2019

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

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

Back to the top