-
Messaging has been around for quite a while even before JMS as a way to build reliable, flexible, and scalable communication system. Some of you might have heard the term, Message-Oriented-Middleware, or MOM in short. In fact, in the mainframe world, product like IBM’s MQ_Series has been around for quite a while.
-
Messaging can be defined as a method of communication between software components and applications, which is required when we are talking about some enterprise level applications.
-
A messaging system is a peer to peer facility in which a messaging client can send messages to other clients as well as receive messages from other clients. Here each client connects to a message agent that facilitates the creating, sending, receiving and reading messages.
-
Messaging System Concepts
-
De-coupled (Loosely-coupled) communication
-
Asynchronous communication
-
Messages are the means of communication between applications.
Messaging System Features
Support of two messaging models
- Point-to-point -: A message is consumed by a single consumer [ Queue ]
Queue

- Publish/Subscribe -: A message is consumed by multiple consumers [ Topic ]
Topic
It has as below
-
Reliability
-
Transactional operations
-
Distributed messaging
-
Security
Technically Message Driven bean
-
A Message driven bean does not have a remote or local business interface
-
You can not call a message driven bean by using an object oriented remote method invocation interface.
-
Message driven beans support generic listener methods for message delivery.
-
Message driven bean listener methods do not have return values.
-
Message driven beans might not send exceptions back to clients.
-
Message driven beans are stateless in nature.
-
Message driven beans are single threaded.
-
Message listener interface is business interface
-
Bean class implements it or designates with @MessageListener
-
No requirement to implement other interfaces
-
Annotations
@MessageDriven
// EJB 3.0 Message-driven bean: Bean Class
@MessageDriven public class PayrollMDB implements javax.jms.MessageListener {
public void onMessage(Message msg) {
...
}
}
Life Cycle of Message Driven Bean
-
Does not Exist
-
Method-Ready pool State
Why Messaging?
-
Platform independence
-
Network location independence
-
Works well in heterogeneous environments
-
Anonymity
-
Who doesn’t matter
-
Where doesn’t matter
-
When doesn’t matter
-
Contrast with RPC-based systems
-
Scalability
-
Handle more clients with
-
No change in the application
-
No change in the architecture
-
No degradation in system throughput
-
Increase hardware capacity of messaging system if higher scalability is desired
-
Robustness
-
Receivers can fail.
-
Senders can fail.
-
Network can fail.
-
Messaging System continues to function
Messaging Applications
-
Credit card transactions
-
Weather reporting
-
Workflow
-
Network management
-
Supply chain management
-
Customer care
-
Communications (Voice Over IP, Paging Systems, etc.)
-
Many more……
Click Here to Download the Code for MDB Bean Deployment
Recent Comments