Sometimes it would be useful to distribute the processing of some data to several threads in an EJB3 session bean.
Let's say that a stateless session bean fetches a lot of data from the database, splits it into several partitions and would like to spawn processing of those partitions in their own, parallel threads. What is the best way to accomplish this? Using message driven beans?
EDIT: I would also need to somehow get informed, when all the MDBs have finished processing their data, so that the results could be combined and sent for the requester.