You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dirk Storck <Di...@cms.tecmath.de> on 2002/02/13 14:16:36 UTC

How can I use a background process with JBoss

Hi,

I want to do the following:

I have a ShoppingCart.
The users clicks on order and the items from the ShoppingCart are moved to
my OrderBean. ShoppingCart and OrderBean are EJB's.

Now it comes to the problem. The order must be proccessed in background
cause it will have a long durration.
After the order has be proccessed the user should be notived somehow.

How can I achieve this with JBoss and Struts ? What would be the best way to
implement this

Many thanks any any suggestions are welcome!!!


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [JBoss-user] How can I use a background process with JBoss

Posted by Joachim Schaaf <js...@cataloom.com>.
Hi,

Am Mittwoch, 13. Februar 2002 14:16 schrieb Dirk Storck:
> Hi,
> I want to do the following:
> I have a ShoppingCart.
> The users clicks on order and the items from the ShoppingCart are moved to
> my OrderBean. ShoppingCart and OrderBean are EJB's.

It's funny to see how everyone is working on similar problems (even the names 
of my classes are the same :) ).

> Now it comes to the problem. The order must be proccessed in background
> cause it will have a long durration.
> After the order has be proccessed the user should be notived somehow.

The EJB spec. doesn't allow threads, so I think you will have to use message 
driven beans (MDB, belongs to EJB 2.0). The notification could be done via 
email.

> How can I achieve this with JBoss and Struts ? What would be the best way
> to implement this

I haven't used MDB's yet, but the trick is to start a time consuming 
operation with a MDB and let it notify you when it's ready; your Struts 
action class would simply start the thing and return.

Joachim
-- 
Dipl.-Ing. Joachim Schaaf | Projektleiter | mailto:js@cataloom.com
cataloom AG | Eupener Str. 148 | 50933 Köln | http://cataloom.com/
Tel: +49 221 4851807 | Fax: +49 221 4851907 | Mobil-Tel: +49 170 7667807

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How can I use a background process with JBoss

Posted by Keith <ke...@yahoo.com>.
1 - Make the order process quick - it should be. Then you avoid the problem.
Make user wait till it's done.
2 - Don't notify the user - let them do an enquiry to check if they want. If
your system is any 100% reliable & audited they will rely on it & won't even
want to be notified.
3 - Send the user an email when the order processing  completes. As far as I
know you can't interupt a web app from the server. 
4 - Use a messaging system designed for asynchronous processing. MQ Series
(maybe Java mesagin Service).

--- Dirk Storck <Di...@cms.tecmath.de> wrote:
> Hi,
> 
> I want to do the following:
> 
> I have a ShoppingCart.
> The users clicks on order and the items from the ShoppingCart are moved to
> my OrderBean. ShoppingCart and OrderBean are EJB's.
> 
> Now it comes to the problem. The order must be proccessed in background
> cause it will have a long durration.
> After the order has be proccessed the user should be notived somehow.
> 
> How can I achieve this with JBoss and Struts ? What would be the best way to
> implement this
> 
> Many thanks any any suggestions are welcome!!!
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>