Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] CDOStaleReferencePolicy.PROXY
[CDO] CDOStaleReferencePolicy.PROXY [message #901284] Fri, 10 August 2012 15:46 Go to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 340
Registered: July 2009
Senior Member
Hi,

A little question about CDOStaleReferencePolicy.PROXY whose role, if I
understand well, is to create unresolvable EMF proxy for detached
CDOObject but the java proxy created return false to the eIsProxy()
method. It is here my misunderstanding of CDOStaleReferencePolicy.PROXY,
why a java proxy wouldn't simulates a EMF proxy?

Best Regards.
Re: [CDO] CDOStaleReferencePolicy.PROXY [message #901348 is a reply to message #901284] Sat, 11 August 2012 05:29 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 5574
Registered: July 2009
Senior Member
Am 10.08.2012 17:46, schrieb Esteban Dugueperoux:
> Hi,
>
> A little question about CDOStaleReferencePolicy.PROXY whose role, if I understand well, is to create unresolvable EMF
> proxy for detached CDOObject
No, EMF proxies are not supported by CDO because the reference resolution mechansim is totally different. By default
(i.e. with CDOStaleReferencePolicy.EXCEPTION) a CDOObject throws an exception on eGet(reference, i) if the reference
target does not exist.

> but the java proxy created return false to the eIsProxy() method. It is here my misunderstanding of
> CDOStaleReferencePolicy.PROXY,
CDOStaleReferencePolicy.PROXY creates a Java dynamic proxy object to delay the throwing of an exception until the
returned proxy object is accessed. The proxy only supports the most fundamental EObject functionality, in particular
object identity so that higher level frameworks have a chance to remove/unset the stale reference without risking to run
into unexpected/unchecked exceptions.

> why a java proxy wouldn't simulates a EMF proxy?
Why should it, without a chance of being resolved properly?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Previous Topic:Group plugins to categories
Next Topic:[Xcore] Imposing constraints on Xcore model
Goto Forum:
  


Current Time: Thu Nov 27 19:56:23 GMT 2014

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

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