You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Jaabax <ja...@gmail.com> on 2017/07/31 20:07:36 UTC
No transaction with AOP using spring-flex
hi
does anyone know how spring-flex obtain my service beans during a request?
does it gets from the context? I have no transaction opened when I call a
service like:
@Service
@RemotingDestination
public class GenericServiceImpl extends CrudService implements
GenericService {
@Autowired
private GenericRepository genericRepository;
@Override
protected GenericRepository getRepository() {
return genericRepository;
}
}
I get a "No transactional EntityManager available"...
btw I am using XML declarative transactions with AOP.. dont want to annotate
all classes with @transactional
when I inject this service in my tests all works well
I created a spring mvc project to inject the service on the controller and
all worked well too
I believe its the way that spring-flex retrieve my service bean from the
contex
any help?
thank you very much!
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/No-transaction-with-AOP-using-spring-flex-tp15575.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: No transaction with AOP using spring-flex
Posted by Jaabax <ja...@gmail.com>.
The problem was in the point-cut defined in the Spring context.
I changed from:
<aop:pointcut id="services-pointcut"
expression="<b>execution(* my.services.pkg.*.*(..))*" />
To:
<aop:pointcut id="services-pointcut"
expression="<b>bean(*ServiceImpl)*" />
Anyone got it working using "execution" instead of "bean"?
Thank you.
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/No-transaction-with-AOP-using-spring-flex-tp15575p15594.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.