[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Aspect Weaving GlassFish and Errors

Yup...apologies.  I wrote that without try to compile it first.  :-)

On Wed, Sep 24, 2008 at 12:37 PM, Ramnivas Laddad
<ramnivas@xxxxxxxxxxxxxxx> wrote:
> Indeed, either replace the first '*' with 'public' or remove the first
> '*' altogether (reason: constructor pattern should not specify a return
> type).
> -Ramnivas
>
> On Wed, Sep 24, 2008 at 8:27 AM, Dean Wampler <dean@xxxxxxxxxxxxxxxxxxxxx>
> wrote:
>>
>> Try replacing the first '*' in each expression with "public". It's
>> probably interpreting the '*' as the return type.
>> On Sep 24, 2008, at 1:30 AM, Jason Weinstein wrote:
>>
>> Thanks for your reply. I just want to get it working first, before tuning
>> the aspects.
>>
>> Both this
>>
>> execution(* com.sun.jbi..*+.new(..))
>>
>> and this
>>
>> initialization(* com.sun.jbi..*+.new(..))
>>
>> result in error
>>
>> Syntax error on token "new", "method name (not constructor)" expected
>>
>>
>> Could i be using the wrong version? I am using 1.6.1
>>
>> Andrew Eisenberg wrote:
>>
>> That is quite an aggressive aspect that you have there.  :-)  First,
>>
>> are you sure that you want to use load time weaving?
>>
>> Yes
>>
>> It tends to be
>>
>> more difficult to develop LTW aspects because there is no tooling
>>
>> support for them (so you don't know if it works until you run your
>>
>> program).
>>
>> So, you want to trace every single method and constructor execution of
>>
>> a subclass of com.sun.jbi..*.
>>
>> javax.jbi..*
>>
>> execution(* com.sun.jbi..*+.*(..)) && execution(* com.sun.jbi..*+.new(..))
>>
>> Although, you may really want to advise the initialization of new
>>
>> classes, rather than the execution of constructors:
>>
>> initialization(* com.sun.jbi..*+.new(..))
>>
>> But, as I mentioned, try compile time weaving first to make sure this
>>
>> is doing what you want it to do.
>>
>> I am able to quickly test with LTW.
>>
>> Any idea on the other errors i receive that were in the original message?
>>
>> _______________________________________________
>>
>> 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
>>
>> Dean Wampler, Ph.D.
>> dean at objectmentor.com
>> http://www.objectmentor.com
>> See also:
>> http://www.polyglotprogramming.com  Multi-language and multi-paradigm
>> programming
>> http://www.aspectprogramming.com    AOP advocacy site
>> http://aquarium.rubyforge.org       AOP for Ruby
>> http://www.contract4j.org           Design by Contract for Java5
>> I want my tombstone to say:
>>   Unknown Application Error in Dean Wampler.exe.
>>   Application Terminated.
>>       [Okay]        [Cancel]
>>
>>
>>
>>
>> _______________________________________________
>> 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
>
>