Home » Modeling » UML2 » Re: proxy resolution problem
Re: proxy resolution problem [message #473101] |
Wed, 06 June 2007 13:28 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Laurent,
Are these objects UML Properties? (the term "role" suggests so) The UML
metamodel made a change just prior to the 2.1 M7 milestone, in which the
ConnectorEnd::role <--> ConnectableElement::end association is no longer
bidirectional, but directed from ConnectorEnd to ConnectableElement.
I think the UML2 implementation should be using its inverse-referencing
CacheAdapter to make the resolved O1 know the same role as the proxy.
I have replied to UML2 newsgroup for somebody there to comment further ...
Cheers,
Christian
Laurent Le Goff wrote:
> We have found a strange thing related to EMF2.1 proxies and
> inter-resources references. We have two Objects O1 and O2. There is a
> bidir relation between these two.
>
> O1 <-role1--------role2-> O2
>
> Both objects are stored on different resource files R1 and R2. When O1 is
> loaded from R1, object O2 is not loaded but replaced by a proxy O2' which
> behaves like O2. Particularily, its role1 is O1. Later when the O2' proxy
> is resolved, it appears that the corresponding O2 element is effectively
> loaded from R2, but unfortunatelly, its role1 is null.
>
> Note that role1 is defined transient in O2 and thus is missing in R2.
>
> Is it normal for the resolved objet O2 to have a different role1 than
> its proxy O2' ?
>
> We have locally bugfixed this behavior by using a specific
> ModificationTrackingAdapter attached to our resources. Is that a good
> idea/use of the ResourceTracking mechanism ?
>
> Sam et Laurent
|
|
|
Re: proxy resolution problem [message #473102 is a reply to message #473101] |
Wed, 06 June 2007 15:31 |
Laurent LE GOFF Messages: 15 Registered: July 2009 |
Junior Member |
|
|
Hi Christian,
this is a an ecore model not a UML2 model. I guess the name "role" can be
used IMHO in ECORE metamodel and UML2 metamodel.
On Wed, 06 Jun 2007 09:28:21 -0400, Christian W. Damus wrote:
> Hi, Laurent,
>
> Are these objects UML Properties? (the term "role" suggests so) The UML
> metamodel made a change just prior to the 2.1 M7 milestone, in which the
> ConnectorEnd::role <--> ConnectableElement::end association is no longer
> bidirectional, but directed from ConnectorEnd to ConnectableElement.
>
> I think the UML2 implementation should be using its inverse-referencing
> CacheAdapter to make the resolved O1 know the same role as the proxy.
>
How can I do with an Adapter ? please
Laurent et Sam
> I have replied to UML2 newsgroup for somebody there to comment
further
> ...
>
> Cheers,
>
> Christian
>
>
> Laurent Le Goff wrote:
>
>> We have found a strange thing related to EMF2.1 proxies and
>> inter-resources references. We have two Objects O1 and O2. There is a
>> bidir relation between these two.
>>
>> O1 <-role1--------role2-> O2
>>
>> Both objects are stored on different resource files R1 and R2. When O1
>> is loaded from R1, object O2 is not loaded but replaced by a proxy O2'
>> which behaves like O2. Particularily, its role1 is O1. Later when the
>> O2' proxy is resolved, it appears that the corresponding O2 element is
>> effectively loaded from R2, but unfortunatelly, its role1 is null.
>>
>> Note that role1 is defined transient in O2 and thus is missing in R2.
>>
>> Is it normal for the resolved objet O2 to have a different role1 than
>> its proxy O2' ?
>>
>> We have locally bugfixed this behavior by using a specific
>> ModificationTrackingAdapter attached to our resources. Is that a good
>> idea/use of the ResourceTracking mechanism ?
>>
>> Sam et Laurent
|
|
|
Re: proxy resolution problem [message #473103 is a reply to message #473102] |
Wed, 06 June 2007 15:45 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Laurent,
What a coincidence! The UML metamodel just happens to have a similar
situation with similar names. Therefore, it may provide you an example of
how to resolve your problem.
Have a look at how the
org.eclipse.uml2.uml.internal.operations.ConnectableElementO perations
class's getEnds(ConnectableElement) method uses an inverse-reference query
to add ConnectorEnds to the resultant list that are not actually
serialized. The ConnectableElementOperations::getEnds(ConnectableElement)
method is used, for example, by the
org.eclipse.uml2.uml.internal.impl.PropertyImpl::getEnds() method.
The UML2 2.1 API uses its CacheAdapter (which is an ECrossReferenceAdapter)
to perform this reverse-reference look-up to handle the fact that, in UML2
2.0, the ConnectorEnd <--> ConnectableElement association was bidirectional
and in UML2 2.1 it is directed (ConnectorEnd --> ConnectableElement).
Thus, the reverse direction is semi-derived (when migrating a UML model
from the 2.0 serial format, explicit values are loaded from disk, but they
are not saved out in the 2.1 format).
HTH,
Christian
Laurent Le Goff wrote:
> Hi Christian,
> this is a an ecore model not a UML2 model. I guess the name "role" can be
> used IMHO in ECORE metamodel and UML2 metamodel.
>
> On Wed, 06 Jun 2007 09:28:21 -0400, Christian W. Damus wrote:
>
>> Hi, Laurent,
>>
>> Are these objects UML Properties? (the term "role" suggests so) The UML
>> metamodel made a change just prior to the 2.1 M7 milestone, in which the
>> ConnectorEnd::role <--> ConnectableElement::end association is no longer
>> bidirectional, but directed from ConnectorEnd to ConnectableElement.
>>
>> I think the UML2 implementation should be using its inverse-referencing
>> CacheAdapter to make the resolved O1 know the same role as the proxy.
>>
>
> How can I do with an Adapter ? please
>
> Laurent et Sam
>
>> I have replied to UML2 newsgroup for somebody there to comment
> further
>> ...
>>
>> Cheers,
>>
>> Christian
>>
>>
>> Laurent Le Goff wrote:
>>
>>> We have found a strange thing related to EMF2.1 proxies and
>>> inter-resources references. We have two Objects O1 and O2. There is a
>>> bidir relation between these two.
>>>
>>> O1 <-role1--------role2-> O2
>>>
>>> Both objects are stored on different resource files R1 and R2. When O1
>>> is loaded from R1, object O2 is not loaded but replaced by a proxy O2'
>>> which behaves like O2. Particularily, its role1 is O1. Later when the
>>> O2' proxy is resolved, it appears that the corresponding O2 element is
>>> effectively loaded from R2, but unfortunatelly, its role1 is null.
>>>
>>> Note that role1 is defined transient in O2 and thus is missing in R2.
>>>
>>> Is it normal for the resolved objet O2 to have a different role1 than
>>> its proxy O2' ?
>>>
>>> We have locally bugfixed this behavior by using a specific
>>> ModificationTrackingAdapter attached to our resources. Is that a good
>>> idea/use of the ResourceTracking mechanism ?
>>>
>>> Sam et Laurent
|
|
|
Re: proxy resolution problem [message #619757 is a reply to message #473101] |
Wed, 06 June 2007 15:31 |
Laurent LE GOFF Messages: 15 Registered: July 2009 |
Junior Member |
|
|
Hi Christian,
this is a an ecore model not a UML2 model. I guess the name "role" can be
used IMHO in ECORE metamodel and UML2 metamodel.
On Wed, 06 Jun 2007 09:28:21 -0400, Christian W. Damus wrote:
> Hi, Laurent,
>
> Are these objects UML Properties? (the term "role" suggests so) The UML
> metamodel made a change just prior to the 2.1 M7 milestone, in which the
> ConnectorEnd::role <--> ConnectableElement::end association is no longer
> bidirectional, but directed from ConnectorEnd to ConnectableElement.
>
> I think the UML2 implementation should be using its inverse-referencing
> CacheAdapter to make the resolved O1 know the same role as the proxy.
>
How can I do with an Adapter ? please
Laurent et Sam
> I have replied to UML2 newsgroup for somebody there to comment
further
> ...
>
> Cheers,
>
> Christian
>
>
> Laurent Le Goff wrote:
>
>> We have found a strange thing related to EMF2.1 proxies and
>> inter-resources references. We have two Objects O1 and O2. There is a
>> bidir relation between these two.
>>
>> O1 <-role1--------role2-> O2
>>
>> Both objects are stored on different resource files R1 and R2. When O1
>> is loaded from R1, object O2 is not loaded but replaced by a proxy O2'
>> which behaves like O2. Particularily, its role1 is O1. Later when the
>> O2' proxy is resolved, it appears that the corresponding O2 element is
>> effectively loaded from R2, but unfortunatelly, its role1 is null.
>>
>> Note that role1 is defined transient in O2 and thus is missing in R2.
>>
>> Is it normal for the resolved objet O2 to have a different role1 than
>> its proxy O2' ?
>>
>> We have locally bugfixed this behavior by using a specific
>> ModificationTrackingAdapter attached to our resources. Is that a good
>> idea/use of the ResourceTracking mechanism ?
>>
>> Sam et Laurent
|
|
|
Re: proxy resolution problem [message #619760 is a reply to message #473102] |
Wed, 06 June 2007 15:45 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Laurent,
What a coincidence! The UML metamodel just happens to have a similar
situation with similar names. Therefore, it may provide you an example of
how to resolve your problem.
Have a look at how the
org.eclipse.uml2.uml.internal.operations.ConnectableElementO perations
class's getEnds(ConnectableElement) method uses an inverse-reference query
to add ConnectorEnds to the resultant list that are not actually
serialized. The ConnectableElementOperations::getEnds(ConnectableElement)
method is used, for example, by the
org.eclipse.uml2.uml.internal.impl.PropertyImpl::getEnds() method.
The UML2 2.1 API uses its CacheAdapter (which is an ECrossReferenceAdapter)
to perform this reverse-reference look-up to handle the fact that, in UML2
2.0, the ConnectorEnd <--> ConnectableElement association was bidirectional
and in UML2 2.1 it is directed (ConnectorEnd --> ConnectableElement).
Thus, the reverse direction is semi-derived (when migrating a UML model
from the 2.0 serial format, explicit values are loaded from disk, but they
are not saved out in the 2.1 format).
HTH,
Christian
Laurent Le Goff wrote:
> Hi Christian,
> this is a an ecore model not a UML2 model. I guess the name "role" can be
> used IMHO in ECORE metamodel and UML2 metamodel.
>
> On Wed, 06 Jun 2007 09:28:21 -0400, Christian W. Damus wrote:
>
>> Hi, Laurent,
>>
>> Are these objects UML Properties? (the term "role" suggests so) The UML
>> metamodel made a change just prior to the 2.1 M7 milestone, in which the
>> ConnectorEnd::role <--> ConnectableElement::end association is no longer
>> bidirectional, but directed from ConnectorEnd to ConnectableElement.
>>
>> I think the UML2 implementation should be using its inverse-referencing
>> CacheAdapter to make the resolved O1 know the same role as the proxy.
>>
>
> How can I do with an Adapter ? please
>
> Laurent et Sam
>
>> I have replied to UML2 newsgroup for somebody there to comment
> further
>> ...
>>
>> Cheers,
>>
>> Christian
>>
>>
>> Laurent Le Goff wrote:
>>
>>> We have found a strange thing related to EMF2.1 proxies and
>>> inter-resources references. We have two Objects O1 and O2. There is a
>>> bidir relation between these two.
>>>
>>> O1 <-role1--------role2-> O2
>>>
>>> Both objects are stored on different resource files R1 and R2. When O1
>>> is loaded from R1, object O2 is not loaded but replaced by a proxy O2'
>>> which behaves like O2. Particularily, its role1 is O1. Later when the
>>> O2' proxy is resolved, it appears that the corresponding O2 element is
>>> effectively loaded from R2, but unfortunatelly, its role1 is null.
>>>
>>> Note that role1 is defined transient in O2 and thus is missing in R2.
>>>
>>> Is it normal for the resolved objet O2 to have a different role1 than
>>> its proxy O2' ?
>>>
>>> We have locally bugfixed this behavior by using a specific
>>> ModificationTrackingAdapter attached to our resources. Is that a good
>>> idea/use of the ResourceTracking mechanism ?
>>>
>>> Sam et Laurent
|
|
|
Goto Forum:
Current Time: Fri Apr 19 04:07:35 GMT 2024
Powered by FUDForum. Page generated in 0.02342 seconds
|