www.douglassdavis.com said:
Another thing... If some one can answer this please.. When should I
use a message driven bean?? I thought all Enterprise JavaBeans
supported RMI. Isn't that enough?
Perhaps I am not understanding the "Asynchronous interface" thing, and
why that is such a big deal over RMI.
First, JMS allows for the possibility of integration with other
messaging systems which allows for integration with other applications,
legacy or otherwise.
Second, asynchronous process is useful in cases where the client doesn't
care for a result from the server or if the server completes the task.
A simple example of this would be cache management. The client may have
changed the state of some resource requiring others to reload it and
discard the entry from their caches. So the client posts a message to a
JMS topic and interested parties are notified.
Third, the genesis of MDB (message driven beans) was the fact that the
EJB specification prohibited implementations from listening on JMS.
(They could post to JMS; they could probe a JMS queue or topic in
non-blocking mode; but you could not have an EJB respond to a JMS
message without also having a traditional EJB call.) The community
obviously found many uses for this and asked Sun to add MDBs.
HTH,
Ray