This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Services and the fly likes Web Service and threading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Web Service and threading" Watch "Web Service and threading" New topic
Author

Web Service and threading

Mark Hazlett
Greenhorn

Joined: Apr 25, 2011
Posts: 1
I'm looking for a sanity check for this scenario.
Requirement is to integrate a 3rd party application via a web service. The 3rd party client is a java front end to c++ code (jni) for a data cruncher. This data cruncher allocates up to 3GB of memory (cannot run on a 32bit system). In a typical use case, this data cruncher will need to be called ~75 times sequentially. Realizing that threading inside a JBoss AS is generally frowned upon, I can't come up with another option other than to:
Implement an asynchronous web service.
Pass the call to a static class that handles/queues the calls in a java.util.concurrent.ThreadPoolExecutor using a LinkedBlockingQueue with a pool size of 1 and an adequate queue size.
Notify the client via an RMI call (we are using Cajo for now, might be replaced by JMS in the future).

Any thoughts?
 
Consider Paul's rocket mass heater.
 
subject: Web Service and threading