Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Hi All ! Got a couple of questions regarding AspectJ

Hi Adrian,

No harm, no problem, no need to reply...

Just for the record, only the aspects need to be compiled with ajc.

Without LTW:

  CLASSPATH="classes"
  java Main

With LTW:

  ajc -sourceroots aspectj-src/ -outjar aspects.jar
  export ASPECTPATH=aspects.jar
  {aspectj-1.2.1}/bin/aj Main

Enjoy -
Wes

------------Original Message------------
From: Adrian Powell <apowell@xxxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Date: Wed, Feb-16-2005 12:16 PM
Subject: Re: [aspectj-users] Hi All ! Got a couple of questions regarding    AspectJ

Wes, 

I haven't used the LTW in AspectJ, but from what I read, it requires that you compile the Java files with ajc (iajc ant task) which isn't what Reddy had asked.  His question about providing pointcuts at runtime also sounded more like an AspectWerkz-like LTW feature with the XML-configuration file.  I agree though, that your answer is more helpful. 

cheers,
-adrian.
--
Adrian Powell
Centre for IBM e-Business Innovation :: Vancouver
apowell@xxxxxxxxxx / 604-297-3194 


"Wes Isberg" <wes@xxxxxxxxxxxxxx> 
Sent by: aspectj-users-admin@xxxxxxxxxxx 
02/16/2005 11:52 AM Please respond to
aspectj-users

Toaspectj-users@xxxxxxxxxxx 
cc
SubjectRe: [aspectj-users] Hi All ! Got a couple of questions regarding        AspectJ







Load-time weaving support has been in AspectJ since 1.2.  
See the bin directory and the examples in the AspectJ 1.2.1 release.

Wes

------------Original Message------------
From: Adrian Powell <apowell@xxxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Cc: aspectj-users@xxxxxxxxxxx
Date: Wed, Feb-16-2005 11:22 AM
Subject: Re: [aspectj-users] Hi All ! Got a couple of questions regarding AspectJ

Reddy, 

It sounds like you want support for Load-Time Weavers.  There is some notes about the future direction of AspectJ to support this in the Developer's Notebook: http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-home/doc/ajdk15notebook/ltw.html.  It will have notes about how to compile your source and drop in aspects at runtime, how to use XML files to configure the pointcuts and advice, and other handy features.  AFAIK, this isn't well supported in AspectJ yet, but with the addition of AspectWerkz, we can expect to see this in the near future. 

cheers,
-adrian.
--
Adrian Powell
Centre for IBM e-Business Innovation :: Vancouver
apowell@xxxxxxxxxx / 604-297-3194 


"Koduru, Rajendra Kumar Reddy" <rajendra.kumar.reddy.koduru@xxxxxxx> 
Sent by: aspectj-users-admin@xxxxxxxxxxx 
02/16/2005 11:04 AM Please respond to
aspectj-users

To<aspectj-users@xxxxxxxxxxx> 
cc
Subject[aspectj-users] Hi All ! Got a couple of questions regarding AspectJ







HI AspectJ users,

               I am new to AOP, so just started to know info about aspectJ. Got
a basic idea with FAQ'S and some paper online. However got few
queries..Hope that you can help me in this regard.. The list follows

** Note:: Here my questions are related to development aspects.
Production aspects can be neglected. Of course few are general
questions.


1.  I have compiled my application using javac. I develop few aspects
for this application. I only want to compile the aspects nothing else.
Is it possible?

2.  If the answer to the above question is YES, can i use the new byte
code weaver with this aspect binaries and normal .class files [javac
output]??

3.  If i want to instrument only few methods, which i dont know at
compile time of the aspect, what should i do? i.e is it possible to
provide pointcuts and advices for an aspect at run time??
               i.e. I want only few methods of a particular class to be
instrumented, and i dont know these methods at compile time. I want the
user to select the methods and packages/classes at runtime via UI.
               so that I can have a general aspect, which need not be
recompiled.

4. I have compiled sources and aspects with ajc compiler, and if want to
deliver to the customer, without the aspects that were introduced with
the compilation..how can I remove those?? Is selective removal of
aspects possible?? If so could you please let me know the option to be
used.


I hope that you will consider my queries and can help me in this
regard

Thank you
Reddy




_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top