views:

330

answers:

1

i am having trouble multithreading my app. It seems AOP is unable to span over multiple threads i.e. i am unable to execute all the threads within a single transaction. Every thread updates the database on processing. I am using fixedThreadPool and ExecutorCompletionService. Is this a problem with spring?

A: 

One possible solution, but maybe it isn't the easiest setup, is to use JMS. You can send off multiple messages which are processed in parallel, and they can share the same transactional context.

tronda