Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Re: AspectJ with JRockit - Problem with thisJoinPoint

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

Back to the top