aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Asynchronous worker ejb on glassfish server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Asynchronous worker ejb on glassfish server" Watch "Asynchronous worker ejb on glassfish server" New topic
Author

Asynchronous worker ejb on glassfish server

J Milan
Greenhorn

Joined: Aug 05, 2013
Posts: 1
I want to make web application that will utilize pretty much cpu and memory on server.
The goal is to control multi-threaded time consuming server side precessing via web user interface (that processing can last a few hours).

That server side processing will fetch some data from Internet and do some processing with it.
Processed data will be stored in MySQL database for latter usage and reporting.
My plan is to use Java Server Faces, ejbs, with glassfish to configure, execute and at some point split processing over multiple machines.

I have tried to use @Stateless @Asynchronous WorkerBean which was accessed via servlet to start calculation asynchronous. The method that starts calculation returns Future object.
Calculation work as expected in its own thread and finishes fine.

What I need is some kind of status retrieval form WorkerBean. Is there a way I can access that WorkerBean for progress tracking, stopping, etc?
Things become more complicated because application should be able to control more than one WorkerBean via web user interface.

WorkerBean is able to access database so that is an alternative way of communicating with that process, but It is looking to me more like workaround.

Luan Cestari
Ranch Hand

Joined: Feb 07, 2010
Posts: 163

Hi,

I would recommend you to use lightfish (http://lightfish.adam-bien.com/) or the same API that Lightfish use to query the Glassfish container. Another suggestions: IMO, i think it would be better use MDB instead of the Session Beans; Also I would create a different kind of solution depending the requirements (e.g. if you need to process tons of web pages and for long running operations, it would need to change the architecture, but only if it needs, otherwise it is better keeping the architecture as it is now).

Regards
Luan


Please, visit me for some cool tech post at www.ourdailycodes.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Asynchronous worker ejb on glassfish server