Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EclipseLink weaving for EMF models
EclipseLink weaving for EMF models [message #515168] Wed, 17 February 2010 23:53 Go to next message
Assen Sharlandjiev is currently offline Assen Sharlandjiev
Messages: 17
Registered: January 2010
Location: Sofia, Bulgaria
Junior Member

It appears that weaving is not supported for EMF models. I tried both dynamic and static weaving, and found out that some methods were not added to the waved classes.

for example, _persistence_checkFetched..

Further investigation on the problem lead me to the ClassWeaver implementation. At the visitEnd method, that is responsible to add the missing _persistence_* methods to my class, it tries to add these to the root of the class hierarchy.. Hmm...

The classes of the EMF models always inherit the EObject class. Obviously the EObject class is not JPA mapped entity.
This is the code from the ClassWeaver:
       if (classDetails.shouldWeaveFetchGroups()) {
            weaved = true;
            weavedFetchGroups = true;
            if (classDetails.getSuperClassDetails() == null) {          
                addFetchGroupVariables();
                addFetchGroupMethods(this.classDetails);
            }
        }



The only solution for me is to turn off weaving for now.

Does anyone have a solution for weaving EMF models with Teneo/Eclipselink?

Assen.
Re: EclipseLink weaving for EMF models [message #515598 is a reply to message #515168] Fri, 19 February 2010 14:01 Go to previous message
Shaun Smith is currently offline Shaun Smith
Messages: 197
Registered: July 2009
Senior Member
Hi Assen,

Weaving EMF models is currently not supported by Teneo/EclipseLink.
Additional work is needed to support weaving of EMF classes like EList
and EMap. The issue lies in the fact that EclipseLink has support for
standard Java collections as per the JPA spec and EMF has collections
with some rather 'unique' properties. In fact, the majority of the
Teneo EclipseLink runtime code just deals with this issue. Weaving is
just something that hasn't been addressed yet.

Shaun

On 17/2/2010 6:53 PM, Assen Sharlandjiev wrote:
> It appears that weaving is not supported for EMF models. I tried both
> dynamic and static weaving, and found out that some methods were not
> added to the waved classes.
>
> for example, _persistence_checkFetched..
>
> Further investigation on the problem lead me to the ClassWeaver
> implementation. At the visitEnd method, that is responsible to add the
> missing _persistence_* methods to my class, it tries to add these to the
> root of the class hierarchy.. Hmm...
>
> The classes of the EMF models always inherit the EObject class.
> Obviously the EObject class is not JPA mapped entity.
> This is the code from the ClassWeaver:
>
> if (classDetails.shouldWeaveFetchGroups()) {
> weaved = true;
> weavedFetchGroups = true;
> if (classDetails.getSuperClassDetails() == null) {
> addFetchGroupVariables();
> addFetchGroupMethods(this.classDetails);
> }
> }
>
>
> The only solution for me is to turn off weaving for now.
>
> Does anyone have a solution for weaving EMF models with Teneo/Eclipselink?
>
> Assen.


--
Oracle <http://www.oracle.com>
Shaun Smith | Principal Product Manager
Phone: +19055023094
Oracle Server Technologies, Oracle TopLink
ORACLE Canada | 110 Matheson Boulevard West, Suite 100, Mississauga,
Ontario | L5R 3P4
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to
developing practices and products that help protect the environment
Previous Topic:Cache hits for non object queries
Next Topic:Check the connection and try to reconnect
Goto Forum:
  


Current Time: Sun Sep 21 08:22:25 GMT 2014

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

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