madhuri.sayana wrote:
Hello Everyone and Bipin!
I have a HibernateUtil class which is an example given in HIbernate documentation. I have a aspect which upon calling any method in TopicUserAdmin.java should invoke the Hibernate session. I want the session to be available in java class. Any help on this will be great.
This really is an AspectJ question, so probably you should have posted it to AspectJ lists.
Your pointcut is :
Code:
pointcut hibernateFetch(TopicUserAdmin tua) : call (public * *.add(..)) && target(tua);
This pointcut does not
1. Consider the package structure of TopicUserAdmin class
2. Advises the call of add() method, rather that addTopic() method
Try fixing these issues with the pointcut and I hope that the Aspect will work for you.
Thanks,
Binil