[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?
|
- From: Andrew Eisenberg <andrew@xxxxxxxxxxxx>
- Date: Wed, 15 Jul 2009 09:24:00 -0700
- Delivered-to: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:reply-to:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=ZmLczmcoTex8WeEjYC0CHQ09rAp+BedJbjpSQWY6oMg=; b=RieD3aMRCdzYXIeREkjYklRQzArHZFoAm0X/AvB84jQp078oIJVmR6RIXgxdJ716cA lr2mqyxWXgCX6GsQ5rfJfxUGXyCYbGX84F7rUZuuWLmJHwDBv29dyZgeD4EzSdv48vwj y5v4qMJZbZI57s/sxHqe2wmFKEiQtQQBHWqOM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=mQ5VjaPCAIndEgNuAY7DPWaPtz32zAvOJlvupIAnmbjfSYrDKkyQc+Z3wlyLqH4Xgk hLEJac8CZ1zN79QgVlNvn7aj+aetSImPCHNdMTqVsbLJjS+KU4pbQeSDeO4qgNi4thHP 5CkBtl3AM9VRdNsJVXO7qEx9ebaMfxtqhxOyE=
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
>
>