Let's say you are creating a user's account and part of that it to create
an email account for the new user.

The email account will be created by 'someone' that specializes in email
and has partnered with your company.

You do what needs to be done on your side of things and wait for
confirmation of the email account creation.  If there is a problem
creating the email account (the server is down, the username is taken,
...) you need to be able to rollback the transaction (or deal with it in
some graceful manner).

This kind of scenario is common and is handled well by a queue, in this
case, JMS.  You might want to look at 'ACID' and 'two-phase commits'.

Scott Durrant
Human Genetics
University of Utah
[EMAIL PROTECTED]


On Mon, 12 Jun 2000, Chuck Butkus wrote:

> You should use JMS if you want to do things "asynchonously".
>
> Since you are forbidden to create threads in your beans, you cannot call a
> method on a bean directly and have it be an asynchronous call.  In other
> words, you will have to wait until the bean has completed its processing.
> This may include calling other beans, databases, clients, etc.  This
> behavior can be undesirable in many situations where you just want to call
> the method and have it return before doing any heavy processing, allowing
> the caller to go on with other tasks.
>
> To accomplish this you would either have to create a middleman object to
> handle the threading issues (not the simplest thing to implement) or use
> JMS.
>
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Mr. Jake
> Sent: Thursday, June 08, 2000 2:50 PM
> To: [EMAIL PROTECTED]
> Subject: Practical JMS usage
>
>
> Hello,
>
> I have been reading a lot about JMS recently, and I was wondering if anyone
> could share some of the particular ways that they have been using this in
> practice.  It sounds potentially useful, but I'm having a hard time
> identifying particular instances where this would be of benefit.  I am
> specifically interested in hearing how this would tie in with EJB
> architecture.
>
> I also have two specific questions regarding JMS.  First, if you are using
> it to do something like creating EJBs on the receipt of a message, why is
> this better than, say, just creating the EJB directly via a method
> invocation rather than going through the middleman of a messaging
> system?  Secondly, it seems like JMS is geared towards highly distributed
> systems.  We are in the process of building a product which is a hosted
> service that would need to send messages to customers of ours.  On our end,
> these would be produced using Weblogic.  If these messages were sent using
> JMS, could our customers receive them using a different JMS vendor than
> Weblogic?
>
> Thanks,
> Jake
>
> ----------------------------------------------------------------------------
> ------
> Jake Reichert                       email: [EMAIL PROTECTED]
> Technical Lead                            Phone: (415) 876-7500
> Allpredict                                     Fax: (240) 250-5593
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to