[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [aspectj-users] Re: AspectJ with JRockit - Problem with thisJoinPoint
|
- From: "Andrew Eisenberg" <andrew@xxxxxxxxxxxx>
- Date: Thu, 16 Oct 2008 08:32:47 -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:received:received:message-id:date:from:reply-to :sender:to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=D7IIuCe1dGiNFKFPIhXGdb0PkUoiSuwxeIrWPWD8lU4=; b=DrLPntjd68jG5BgDlp4scMfC4ASC+UpKGoFq3P4rfmoi7S3RHR069/BRCiB2Nxhw5J uL2RWeHp5ko+1h+/wF2BJ+tpqot6yGVrAGTuoSndSj79XzNu38+pSAwGl6pxmQS1urTN t1oQSqP5QCrPbyMe4DKEcnY88dFqdvtA5iTpg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=iJH0Lbi4GaiJy0gR5MgU4BuE6UChX42Dco7+wAdu62c6pMRnwJSfLoghq+h7ScXICJ LiaNa27t4Fst4c4Ld7nn6Clr59atzKh8gY8h8skYxAsNK3QScJGwrPAMXC6gAxIkBLh1 NFq3hHBkCar2WcgXvrD2+3u78EM6bkHITSx18=
Aspects in a jar must go in the aspect path of a project that wants to
consume the aspects.
On Thu, Oct 16, 2008 at 8:01 AM, Luiz Antonio Soares Filho
<luiz@xxxxxxxxxxxxxx> wrote:
> Hello you guys,
>
> Thanks for the help. The -showWeaveInfo flag was really important to
> understand how AspectJ works with the weblogic server in the LTW.
> I solve my two problems. The mistake was that in all changes I made to my
> aspects, I were not restarting my server, but this is necessary.
>
> I have a doubt about packing the aspects in a jar. Can I do that and simply
> put the jar in the classpath of my project? This will work ?
>
> Thanks to everyone that helped me,
> Luiz
>
> 2008/10/14 Andy Clement <andrew.clement@xxxxxxxxx>
>>
>> Hi Luiz,
>> Are you able to describe the actual NoSuchMethodError that you see?
>> The advice coming out multiple times is no doubt due to advising more
>> places than you think. If you cannot use the cross references view in
>> eclipse then try specifying the -showWeaveInfo flag in the weaver option
>> section of your aop.xml. Then on startup the load-time weaver will tell you
>> everywhere it is weaving - and you can check if it is what you expect.
>> Andy.
>>
>> 2008/10/14 Luiz Antonio Soares Filho <luiz@xxxxxxxxxxxxxx>
>>>
>>> Hello again.
>>>
>>> Unfortunately, i'm using BEA Workshop so I can't use crosscutting view.
>>> I will try to explain better my situation here.
>>>
>>> I'm using load time weaving but I don't understand how it really works.
>>> So I think the problem is bigger than a simple problem with thisJoinPoint or
>>> something like that.
>>> I make an aop.xml file to set some configurations.
>>> My application server console give me infos identifying my aspects.
>>>
>>> In the project i'm trying to use AOP, I have files like Page Flow files
>>> with .jpf in the extension. This may be a problem?
>>>
>>>
>>>
>>> On Oct 13, 2008, at 5:18 PM, Andrew Eisenberg wrote:
>>>
>>> > As for your second problem, it seems like Aspectj is weaving in more
>>> > places than you realize, making advice calls more often. If you are
>>> > using AJDT then you can count the number of join point shadows that
>>> > are advised (using the crosscutting view).
>>>
>>> That's one thing. The other is that you have a "call" join point.
>>> Which means the advice is executed every time the _running_ program
>>> _calls_ advised methods. So even if you have only 1 advised method, if
>>> it's called in a loop that executes 100 times, you will see 100
>>> messages.
>>>
>>> Jochen
>>>
>>>
>>> > On Mon, Oct 13, 2008 at 7:56 AM, Luiz Antonio Soares Filho
>>> > <luiz@xxxxxxxxxxxxxx> wrote:
>>> >> Hello,
>>> >>
>>> >> I'm trying to use AspectJ with JRockit and I have some problems.
>>> >>
>>> >> I'm can't use variables such as thisJoinPoint. That gives exception
>>> >> like
>>> >> 'NoSuchMethod'.
>>> >>
>>> >> There is my test code:
>>> >>
>>> >> public aspect Aspecto {
>>> >> public pointcut pc() : call(*
>>> >> JPFManterDocumentoController.
>>> acIr*(..));
>>> >>
>>> >> before(): pc() {
>>> >> System.out.println(thisJoinPointStaticPart.toString());
>>> >> }
>>> >> }
>>> >>
>>> >>
>>> >> Another problem is when printing a String in the code above, the
>>> >> String is
>>> >> printed many times in console, when it would bem printed only once.
>>> >> In the
>>> >> class JPFManterDocumentoController there are only 4 methods with
>>> >> "acIr"
>>> >> prefix. But the String is printed more than 10 times with no sense.
>>> >>
>>> >> Sorry for my english and thanks,
>>> >> Luiz
>>> >>
>>> >>
>>> >> _______________________________________________
>>> >> aspectj-users mailing list
>>> >> aspectj-users@xxxxxxxxxxx
>>> >> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>> >>
>>> >>
>>> > _______________________________________________
>>> > aspectj-users mailing list
>>> > aspectj-users@xxxxxxxxxxx
>>> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>
>>>
>>>
>>> ------------------------------
>>>
>>> _______________________________________________
>>> aspectj-users mailing list
>>> aspectj-users@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>> _______________________________________________
>>> aspectj-users mailing list
>>> aspectj-users@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>>
>>
>>
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>