Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » Problems when using ApsectJ and Gemini EclipseLink weaving for LazyLoading (Problems when using ApsectJ and Gemini EclipseLink weaving for LazyLoading )
Problems when using ApsectJ and Gemini EclipseLink weaving for LazyLoading [message #1272172] Mon, 17 March 2014 08:54 Go to next message
Jack Kilian is currently offline Jack KilianFriend
Messages: 36
Registered: March 2012
Member
Hi,

I would like to combine EclipseLink Dynamic weaving with AspectJ custom Aspects.
E.g. my goal is to recognize when a setter of a Model class is called.

pointcut wrapJpaSetterMethods() : ( execution(void mypackage.model.*.set*(..))





My Problem is now, that this combination of AspectJ (Equinox weaving) and EclipseLink dynamic weaving log an warning when I use LazyLoading defined attributes like:...

    @OneToOne(fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST })
    @JoinColumns({ @JoinColumn(name = "ID", referencedColumnName = "REF_ID", nullable = false, insertable = false, updatable = false), })
    private MyClass myClass;




the message is due to this for all classes who are waved by my own AspectJ aspect:

Reverting the lazy setting on the OneToOne or ManyToOne attribute [myClass] for the entity class [class mypackage.model.MyClass] since weaving was not enabled or did not occur.

Any experience in the EclipseLink world?

Is this a problem of the weaving order - in other words if EclipseLink or AspectJ is the first weaver?

best regards
jk

[Updated on: Mon, 17 March 2014 08:54]

Report message to a moderator

Re: Problems when using ApsectJ and Gemini EclipseLink weaving for LazyLoading [message #1272431 is a reply to message #1272172] Mon, 17 March 2014 22:55 Go to previous messageGo to next message
Michael Keith is currently offline Michael KeithFriend
Messages: 216
Registered: July 2009
Senior Member
Hi Jack,

I assume you are using Gemini JPA? Did you turn weaving on, as shown in the doc here?

-Mike
Re: Problems when using ApsectJ and Gemini EclipseLink weaving for LazyLoading [message #1272708 is a reply to message #1272431] Tue, 18 March 2014 14:53 Go to previous messageGo to next message
Jack Kilian is currently offline Jack KilianFriend
Messages: 36
Registered: March 2012
Member
YES. I use as shown in the doc here Link

First my custom weaving is executed:

[org.eclipse.equinox.weaving.hook] info adding AspectJ hooks ...
[org.eclipse.equinox.weaving.aspectj] info Starting AspectJ weaving service ...
[mypackage.model] info AspectJ Weaver Version 1.7.3 built on Thursday Jun 13, 2013 at 19:41:31 GMT
[mypackage.model] info register aspect mypackage.model.aspectj.WrapJpaModelRelevantSetterMethods
[org.eclipse.equinox.weaving.aspectj] info weaving bundle 'mypackage.model'


and when I start Gemini..the dynamic weaving of Gemini JPA (EclipseLink) is executed and afterwards reverted.
Re: Problems when using ApsectJ and Gemini EclipseLink weaving for LazyLoading [message #1276508 is a reply to message #1272708] Mon, 24 March 2014 17:06 Go to previous message
Michael Keith is currently offline Michael KeithFriend
Messages: 216
Registered: July 2009
Senior Member
Hi Jack,

Gemini uses the standard OSGi API for weaving so it should work even if there are multiple weavers. Are you saying that you see the weaving happening and then being reverted back? Do you have the full trace of this happening (with the weaving debug flag turned on)?

-Mike
Previous Topic:Gemini Blueprint Milestone shipped with OSGi R4.2?
Next Topic:Weaving and early bundle activation
Goto Forum:
  


Current Time: Fri Dec 19 17:41:08 GMT 2014

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

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