Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Retrofitting AOP into a Session Bean  RSS feed

 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anyone retrofitted an AOP framework into EJBs. I need to intercept the execution of business methods on a Stateless session bean. Thanks all!
Regards,
Pho
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are numerous frameworks that make this fairly easy to do... the big question is what are you trying to do that you feel demands the added complexity of AOP? Don't get me wrong, AOP is great. But like any other technology... its abuse can only lead to bad things.
 
Mag Hoehme
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pho,
I occasionally use AOP for debugging EJBs. I use the AspectJ 1.1 library (see http://eclipse.org/aspectj/
for downloading).
For compilation I rewrote the ANT build script and replaced the javac tasks with AspectJ's iajc task.
The only problem I encountered was the fact that the iajc task required Java 1.4, whereas the EJBs had to be compiled with Java 1.3. Since I used IntelliJ IDEA, it was no problem to use Java 1.4 to run Ant while compiling the classes using Java 1.3.
Hope this helps -
Mag
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!