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.

Comment

Yes, I agree. But, actually I'd like to specify different kind of transaction for itemReader, itemProcessor and itemWriter.
For example, "PROPAGATION_REQUIRED" for code in read() and write()
and "PROPAGATION_NEVER" for code in readError(), afterRead(). For logging in databe for instance.
I guess there is a way to do this ?

Comment

I think by default listeners are in requires new propagation, but I'd have to double check. (It might only be the skip listeners) You should be able to use @Transactional though. Your AOP issues may be pointcut related, its tough to say without seeing the actual config.

Comment

Hi, I've tried to add the @Transactionnal tag to my method and....it seems to work ! Great !
I don't understand why it works better than the aop config I've tried but, anyway, it works. That's all I want.
Thanks a lot for your help !

Comment

Usually when that happens it's because the pointcut expression is slightly off. It's kind of like a regular expression in that way. (AJDT can help make sure it's actually applying it where you think it is)