> -----Original Message----- > From: Nicholas Lesiecki [mailto:[EMAIL PROTECTED] > Sent: 06 February 2003 01:14 > To: Cactus Developers List > Subject: RE: Cactus and AspectJ > > In response to Vincent: > <<< > 1/ as a development tool for the cactus framework itself, i.e. find > other usages in addition to logging. I'm open to suggestion. BTW, this > is what I find the hardest in AOP: finding usages for it (it may have to > do with my mindset working in "traditional" ways!) > >>> > > I agree with Vincent--more of Cactus' code could use AspectJ. Again, > however, finding the right spots to do it can be difficult. I think this > is > the most compelling use case until we are more familiar with AOP.
I think I may have a use case for more AOP. I'd like to have your opinion though. Lots of our Cactus classes need to be handed both a Logger and a Configuration objects. ATM, the Configuration object is usually passed in the constructors and the Logger is retrieved statically. One option to improve this is of course to use the Avalon Framework and a ComponentManager such as ECM or Merlin/Fortress/etc. However, I'm loathe to do this as it means adding new jar dependencies to the Cactus project for no additional user-visible features. That said, we're starting to have some nice Cactus front-ends which hides much of this... Anyway, one simple solution is to add a Loggable and Configurable interfaces (with getter and setters for Log and Configuration objects). Then we can have a very simple Aspect (which acts as a very basic ComponentManager in Avalon parlance) which simply traps initialization (i.e. constructor) of new Cactus classes and if they implement Loggable pass them a Log object and if they implement Configurable pass them a Configuration object. Ideas? Comments? Thanks -Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
