Daniel; It may become *even more* clear if you ran a test yourself with a trial version of something-or-another or perhaps JBoss. I think I know here you are coming from, but once you are directly exposed to how MDBs work, I think it will be much clearer for you. Subsequently, you will be able to articulate more precise and answerable questions.
What you have outline is confusing to me: > But the point is that if the MOM downloads all of > the messages in the queue > at once The MOM (message oriented middleware ?) IS the Queue. Did you mean MDB (Message Driven Bean ?) If so, this simply does not happen. The MDB has a method called onMessage(Message message) which is invoked when the container pulls a message from a JMS destination and passes it to the instance of the MDB. So physically, only one messaged is passed at one time. What had been proposed earlier in the thread is that if you identifiy a group of messages (a group of n related messages) by the contents of the payload, or the Group ID in the header, you could store the salient portions of the first n-1 messages in state [somehow]. Upon receiving the nth message, you could now consider the group complete, pull all the stored data from state and complete your full logical transaction. It sounds to me like that is what you were looking at doing. It seems complicated to me, but it is possible. //Nicholas --- daniel legziel <[EMAIL PROTECTED]> wrote: > Cristal Clear, > > But the point is that if the MOM downloads all of > the messages in the queue > at once --given that the mdb has the infrastructure > to save all messages and > call them one by one on one instance -- then there > are less transactions > ===> quicker and leaner. If there is another thread > then the same is done on > another instance. So two threads => two instances => > two batches of many > messages to be processed using only two transactions > with the MOM. Anyone > from SUN listening? > > Daniel > > >From: Jonathan Baker <[EMAIL PROTECTED]> > >To: daniel legziel <[EMAIL PROTECTED]> > >CC: Subject: Re: JMS and beans > >Date: Thu, 07 Mar 2002 16:51:01 -0500 > > > >Daniel: > > > >Look at it from this perspective. The bean is just > accepting calls from a > >message system. Those calls are pretty much the > same thing that you get > >from an independent client call, except they come > from messages and not > >client initiated code. > > > >So, how the messages get processed is a question > for the "caller", which in > >this case is the message system. If the message > system has only a single > >thread that is taking messages and calling the > beans, the messages will be > >processed "in order". If it has multiple threads, > they will be processed > >concurrently. The number of threads determines how > many concurrent calls > >are made. > > > >Does that help? > > > > > >Jonathan > > > > > > > >daniel legziel wrote: > > > > > > Jonathan: > > > > > > You said that MDBs can either process messages > in batch or concurrently. > >I > > > don't see how these two processes negate each > other. In my mind I just > >see > > > the MOM sending a load of messages to an > instance and the instance > >taking > > > care of individualization. I could just as well > see another thread doing > >the > > > same (with all the new messages that have > arrived) on another instance. > > > > > > Thanks a bunch > > > > > > Daniel > > > > > > > _________________________________________________________________ > > > Send and receive Hotmail on your mobile device: > http://mobile.msn.com > > > > > > > >=========================================================================== > > > 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". > > > >-- > >Jonathan Baker > > > >Senior Architect > >eBusiness Division > >Sybase, Inc. > > > >[EMAIL PROTECTED] > >+1 301 896 1363 > > > > > > > _________________________________________________________________ > MSN Photos is the easiest way to share and print > your photos: > http://photos.msn.com/support/worldwide.aspx > > =========================================================================== > 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". > ===== Nicholas Whitehead Home: (973) 377 9335 Cell: (201) 615 2716 Work: (212) 235 5783 [EMAIL PROTECTED] __________________________________________________ Do You Yahoo!? Try FREE Yahoo! Mail - the world's greatest free email! http://mail.yahoo.com/ =========================================================================== 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".
