[jboss-user] [JBoss AOP] - Jboss AOP loads but doesnt seem to be working
Tino Sainz
do-not-reply at jboss.com
Wed May 4 12:33:00 EDT 2011
Tino Sainz [http://community.jboss.org/people/black_ice_spa] created the discussion
"Jboss AOP loads but doesnt seem to be working"
To view the discussion, visit: http://community.jboss.org/message/603489#603489
--------------------------------------------------------------
Hello,
This its my first AOP project (porting from AspectJ) and i followed this guide (a little):
http://java.dzone.com/news/an-introduction-aspect-oriente?page=0,1 http://java.dzone.com/news/an-introduction-aspect-oriente?page=0,1
I put the javaagent pointing to jboss-aop-single.jar (download aop today, so lastest GA version). <- Using Load time weaving
<aop>
<aspect class="main.customHibernateAOP"/>
<bind pointcut="execution(void pruebahibernate_1.ManejadorLibro2->pruebas())">
<around aspect="main.customHibernateAOP" name="inicializa"/>
</bind>
</aop>
Using that jboss-aop.xml (it gets loaded, and main.customHibernateAOP its also found) i get no errors, if i change for example main.customHibernateAOP to main.ajajdjasj i'll get class not found there, so jboss-aop.xml and classes are fine (not classpath problem i think).
My problem is that it does absolutely nothing (doesnt print to out)
public class customHibernateAOP {
public Object inicializa(MethodInvocation invocation) throws Throwable{
System.out.println("Awwwwwwwiniciww\n\n\n\n"); <-- It never prints on console
return invocation.invokeNext();
}
}
That's my method.
My class its pruebahibernate_1.ManejadorLibro2
and method its
public void pruebas() {
System.out.println("Im here"); (this one does show on console)
...}
I have a more complex pointcut (the one im really porting) also there and not working.
Any help?, thanks
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/603489#603489]
Start a new discussion in JBoss AOP at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2027]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110504/18321245/attachment.html
More information about the jboss-user
mailing list