Parallel/Asynchroneous Processing


EJB programming & troubleshooting: Parallel/Asynchroneous Processing

  1. Parallel/Asynchroneous Processing (3 messages)

    In our application, an user can have access to mulitple accounts(100 accounts). We have a requirement to process a task for group of accounts. That task might take 5 -10 secs for each user. Currently we are acheiving it by doing one by one. By increasing the number of users might put application in jeopardy. Is there any API in java which supports by taking multiple requests at a time and process it parallely like threading. Thanks Shri
  2. Hi Shri Yes there is Parallel/Asynchroneous Processing in J2EE it is called JMS you can use it to send async messages to queue or either to send async messages to topic bases on publich/subscribe mechanism. You can use this link to implement a light framework above JMS which simplify the use of JMS:
  3. You may want to look into the Executors in java.util.*. This is a simple well managed thread, found it very useful in my previous experience. Thanks, Senthil Balakrishnan
  4. Hi Shri, Using Queue in JMS may not result in parallel processing as all accounts would get processed by only one receiver. Using topic would help achieve parallel processing (assuming that all topic listeners are running in their own process), but you need to make sure there is no duplication of processing. Kailash