Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Enabling aspects at a runtime w/o using ajc in the tests?

I believe that you are looking for Load-Time weaving.
http://www.eclipse.org/aspectj/doc/released/devguide/ltw.html

You need to supply an aop.xml and specify the LTW java agent when starting java.

However, I'm not exactly sure what you are trying to do, and if LTW is
most appropriate.  If the problem you are seeing is that your aspects
are not being applied, then make sure that you have your aspect path
or in path set up properly.

If you continue to have problems or what I am describing doesn't help,
then you are welcome to ask for more help.

--a

On Wed, Jul 15, 2009 at 8:44 AM, Eugene Dzhurinsky<bofh@xxxxxxxxxxx> wrote:
> Hello!
>
> Can somebody please suggest me, how can I *enable* aspects to certain business
> methods of a certain class at a runtime, without compiling the aspects with
> ajc?
>
> The methods of the business object are adviced with annotations, and now I
> want to test if the aspects are applied correctly and results are predicted,
> using the set of mock classes.
>
> The problem is aspects seems to not get applied to the class, and I gues
> that's because of the business class is not compiled with ajc. It is used
> within Spring with aspectj-weaver module enabled (afaik this module modifies
> classes at the runtime?).
>
> So is there any way to enable weaving without using ajc in the unit tests?
>
> Thank you in advance!
> --
> Eugene N Dzhurinsky
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


Back to the top