This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

<tx:advice> and <aop:pointcut> seems not working for Abstract Dao PatternPage Title Module

You cannot apply transactions to the AbstractDao because you are issueing internal method calls. Internal calls don't pass through a proxy and hence don't get transactions applied. Next to that you are using the EntityManagerFactory to create a NEW EntityManager outside the scope of spring, you should be using the injected EntityManager.

You can try to get it to work by changing the usage of EntityManagerFactory and by changing your pointcut to also apply to subclasses.