yes - I'll add it as a sample code script.
------------Original Message------------
From: Nicholas Lesiecki <ndlesiecki@xxxxxxxxx>
To: aspectj-users@xxxxxxxxxxx
Date: Mon, Jul-19-2004 5:15 PM
Subject: Re: AW: [aspectj-users] Runtime Configuration
Can I nominate this excellent set of responses for the
FAQ?
Cheers,
Nick
On Jul 19, 2004, at 1:08 PM, Vincenz Braun
wrote:
HiJeff,/x-tad-bigger>
/x-tad-bigger>
Youcould do the following: (I
used a similar approach in my
projects)/x-tad-bigger>
/x-tad-bigger>
-/x-tad-bigger>
/x-tad-smaller>
usethe
avalon framework and let aspects implement the Configurableinterface (or use
an aspectâ¦)/x-tad-bigger>
-/x-tad-bigger>
/x-tad-smaller>
havean
aspect that matches constructor executions of aspects that areconfigurable/x-tad-bigger>
-/x-tad-bigger>
/x-tad-smaller>
configurethese aspects with a configuration
child based upon the class name ofthe
aspect/x-tad-bigger>
-/x-tad-bigger>
/x-tad-smaller>
weaklyregister the aspect instance/x-tad-bigger>
-/x-tad-bigger>
/x-tad-smaller>
onchanges of
the configuration file reconfigure Reconfigurable
aspects/x-tad-bigger>
-/x-tad-bigger>
/x-tad-smaller>
inthe
configuration file have an âenabledâ attribute or element andconfigure the
aspect accordingly/x-tad-bigger>
-/x-tad-bigger>
/x-tad-smaller>
useif(enabled) in
pointcuts/x-tad-bigger>
/x-tad-bigger>
Vincenz/x-tad-bigger>
/x-tad-bigger>
-----UrsprünglicheNachricht-----/x-tad-bigger>
Von:/x-tad-bigger>aspectj-users-admin@xxxxxxxxxxx[mailto:aspectj-users-admin@xxxxxxxxxxx]/x-tad-bigger>Im
Auftrag von/x-tad-bigger>Jeff
Kunkle/x-tad-bigger>
Gesendet:/x-tad-bigger>Montag, 19. Juli 2004
21:19/x-tad-bigger>
An:/x-tad-bigger>aspectj-users@xxxxxxxxxxx/x-tad-bigger>
Betreff:/x-tad-bigger>[aspectj-users] Runtime Configuration/x-tad-bigger>
Is there any way toconfigure AspectJ to
âenable/disableâ aspects at runtime using an XMLconfiguration file or
something similar?/x-tad-bigger>
/x-tad-bigger>
Jeff
Nicholas
Lesiecki
Software Craftsman, specializing in J2EE,
Agile Methods, and
aspect-oriented programming
Books:
* Mastering AspectJ:
http://tinyurl.com/66vf
* Java Tools for Extreme Programming:
http://tinyurl.com/66vt
Articles on AspectJ:
*
http://tinyurl.com/66vu and http://tinyurl.com/66vv