Bad pointcut definition example in user guide
---------------------------------------------
Key: JBAOP-809
URL:
https://issues.jboss.org/browse/JBAOP-809
Project: JBoss AOP
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Documentation
Affects Versions: 2.2.2.GA
Reporter: Zbyněk Roubalík
In JBoss AOP User Guide [1] there is a syntax error in pointcut definition in example.
Pointcut definition is missing expression, there is:
1. <bind pointcut="public void com.mc.BankAccountDAO->withdraw(double
amount)">
2. <interceptor class="com.mc.Metrics"/>
3. </bind >
4. <bind pointcut="* com.mc.billing.*->*(..)">
5. <interceptor class="com.mc.Metrics"/>
6. </bind >
on lines 1 and 4 should be somethink like:
1. <bind pointcut="execution(public void com.mc.BankAccountDAO->withdraw(double
amount))">
4. <bind pointcut="execution(* com.mc.billing.*->*(..))">
I tried to run method-execution example with removed execution() from pointcut definition
in jboss-aop.xml and got error:
[aopc] java.lang.RuntimeException: java.lang.RuntimeException: <bind> pointcut
expression failed: public void POJO->noop()
[aopc] at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:995)
[aopc] at org.jboss.aop.AspectXmlLoader.deploy(AspectXmlLoader.java:1333)
[aopc] at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:1378)
[aopc] at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:1344)
[aopc] at org.jboss.aop.Deployment.deployXmlFile(Deployment.java:184)
[aopc] at
org.jboss.aop.Deployment.preconfigThroughSystemProperty(Deployment.java:165)
[aopc] at org.jboss.aop.Deployment.deploy(Deployment.java:55)
[aopc] at org.jboss.aop.AspectManager$1.run(AspectManager.java:339)
[aopc] at org.jboss.aop.AspectManager$1.run(AspectManager.java:267)
[aopc] at java.security.AccessController.doPrivileged(Native Method)
[aopc] at org.jboss.aop.AspectManager.initManager(AspectManager.java:266)
[aopc] at org.jboss.aop.AspectManager.instance(AspectManager.java:245)
[aopc] at org.jboss.aop.AspectManager.instance(AspectManager.java:234)
[aopc] at org.jboss.aop.standalone.Compiler.compile(Compiler.java:195)
[aopc] at org.jboss.aop.standalone.Compiler.main(Compiler.java:88)
[aopc] Caused by: java.lang.RuntimeException: <bind> pointcut expression
failed: public void POJO->noop()
[aopc] at org.jboss.aop.AspectXmlLoader.deployBinding(AspectXmlLoader.java:289)
[aopc] at
org.jboss.aop.AspectXmlLoader.deployTopElements(AspectXmlLoader.java:1145)
[aopc] at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:990)
[aopc] ... 14 more
[1]
http://docs.jboss.org/jbossaop/docs/2.0.0.GA/docs/aspect-framework/usergu...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira