JBoss.org Community Documentation
<aspect class="org.jboss.SomeAspect"> <attribute name="SomeIntValue">55</attribute> <advisor-attribute name="MyAdvisor"/> <instance-advisor-attribute name="MyInstanceAdvisor"/> <joinpoint-attribute name="MyJoinpoint"/> </aspect>
Aspects can be configured by default using a Java Beans style convention. The
<attribute>
tag will delegate to a setter method and convert the string value to the type of the setter method.
primitive types (int, float, String, etc...) |
java.lang.Class |
java.lang.Class[] |
java.lang.String[] |
java.math.BigDecimal |
org.w3c.dom.Document |
java.io.File |
java.net.InetAddress |
java.net.URL |
javax.management.ObjectName (if running in JBoss) |
Table 5.2. Supported Java Bean types
Besides types, you can also inject AOP runtime constructs into the aspect. These types of attributes are referenced within XML under special tags. See the table below.
<advisor-attribute> | org.jboss.aop.Advisor |
<instance-advisor-attribute> | org.jboss.aop.InstanceAdvisor |
<joinpoint-attribute> | org.jboss.aop.joinpoint.Joinpoint |
Table 5.3. Injecting AOP runtime constructs