The Artima Developer Community
Sponsored Link

Java Buzz Forum
Aspects as a deployable unit via aop.xml

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
Aspects as a deployable unit via aop.xml Posted: Jul 9, 2004 11:35 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: Aspects as a deployable unit via aop.xml
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement
I really like the new feature in AspectWerkz 1.0. They have a notion of an AOP Container in that you can deploy aspects and aspect libraries as components. You just need to setup an aop.xml such as: <!DOCTYPE aspectwerkz PUBLIC "-//AspectWerkz//DTD//EN" "http://aspectwerkz.codehaus.org/dtd/aspectwerkz.dtd"> <aspectwerkz> <system id="webapp"> <aspect class="demoAOP.DemoAspect"> <pointcut name="allPublic" expression="execution(public * *..*.*(..))"/> <advice name="trace" type="around" bind-to="allPublic"/> </aspect> </system> </aspectwerkz> The aspects only affect the area that they should via: Note that if an Aspect is deployed within an application, the pointcut it defines will be limited by the class loader isolation principle. Even if the pointcut assumes to match all method in all classes, it will only "see" all methods in classes loaded by this classlaoder and the child classloader. Cool stuff. It would be fun to have Spring grok this aop.xml file too :) Read Alex's tutorial: How to integrate Aspects in J2EE apps with aop.xml

Read: Aspects as a deployable unit via aop.xml

Topic: EJB 3.0 Early Draft Spec is now available for download. Previous Topic   Next Topic Topic: Rapid Post

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use