Hello Cactus developers, A long while back (just about a year ago, to be precise) I wrote up an article on JUnit, AspectJ, and Cactus.
http://www-106.ibm.com/developerworks/java/library/j-aspectj2/ At the time, I envisioned myself writing a Cactus sample application that would use AspectJ to replace calls to EJBs. Sadly, that has not come to pass, what with writing a book on AspectJ, and being busy in other ways. Still, I feel that I owe the Cactus team some work or at least some thought on the matter, since I said that I might work on it. So, my question is: does it make sense to provide a sample-application integrating Cactus and AspectJ? The answer may be "no." (though I'm still very in-favor of using it internally to the project). Here are my thoughts: 1) Cactus and MO are very different approaches. AspectJ really supports MO, not IC testing. Of course you can combine the two approaches (use MOs in your Cactus test). However, I'm not sure it's the place of Cactus to say anything in particular about which of the many MO frameworks you use to do your mocking. AspectJ is actually somewhat weak for providing MOs in my opinion. The syntax for overriding a method call in a specific circumstance is not terribly easy and requires more effort than simply subclassing or using an interface based framework like EasyMock. (And refactoring to allow traditional mock objects often yields good side-benefits to the code.) 1a) Conversely, if you use AspectJ to do your call replacement, there's no need to be running Cactus. You certainly can, but most often you want to run your code outside of the container if you've gone through the trouble of mocking things up. 2) Integrating AspectJ into your project requires compiling with ajc. This means that creating a sample application that used AspectJ would require instructions, troubleshooting, and support for a variety of AspectJ related issues with regard to the sample app. That's not to say that it isn't worth doing, the sample simply has to be worth more to justify the additional support cost. So, what are the team members' opinions: should I create a simple AspectJ integration app as described in the article above, or should I spend my efforts elsewhere on the project (perhaps in another Aspectj related area?) Cheers, nick --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]