Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: AW: [aspectj-users] Runtime Configuration

yes - I'll add it as a sample code script.
 
Wes
 
------------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,

 

Youcould do the following: (I used a similar approach in my projects)

 

-
         
usethe avalon framework and let aspects implement the Configurableinterface (or use an aspect…)

-
         
havean aspect that matches constructor executions of aspects that areconfigurable

-
         
configurethese aspects with a configuration child based upon the class name ofthe aspect

-
         
weaklyregister the aspect instance

-
         
onchanges of the configuration file reconfigure Reconfigurable aspects

-
         
inthe configuration file have an “enabled” attribute or element andconfigure the aspect accordingly

-
         
useif(enabled) in pointcuts

 

Vincenz

 

-----UrsprünglicheNachricht-----
Von:aspectj-users-admin@xxxxxxxxxxx[mailto:aspectj-users-admin@xxxxxxxxxxx]Im Auftrag vonJeff Kunkle
Gesendet:Montag, 19. Juli 2004 21:19
An:aspectj-users@xxxxxxxxxxx
Betreff:[aspectj-users] Runtime Configuration

 

Is there any way toconfigure AspectJ to “enable/disable” aspects at runtime using an XMLconfiguration file or something similar?

 

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


Back to the top