• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Core Java
  • Design Patterns
  • JSP
  • Servlets
  • Building Tools
  • jQuery
  • Spring
  • Hibernate
  • Mongo DB
  • More
    • HTML
    • SCJP
    • AJAX
    • UML
    • Struts
    • J2EE
    • Testing
    • Angular JS

J2EE Reference

  • Home
  • About Us
    • Java Learning Centers
  • Contact Us

JMS Session

Java Message Service and JMS Programming Model

April 19, 2017 By j2eereference Leave a Comment

What is JMS?

JMS Is the short form of Java Message Service. JMS is a Java API that permits different applications to create and transmit messages to each other using a communication protocol. This communication protocol is designed using J2EE technology and it offers an effective communication that is asynchronous, reliable and loosely coupled.

Java Message Service offers following messaging services:

  • Creating a Message
  • Sending the created Message
  • Receiving the sent message
  • Reading the received message

 

JMS Programming Model

Message transmission is achieved through JMS Programming Model that is depicted below:

JMS Programming Model

As shown in the JMS Programming Model diagram, JMS application is encompassed of six building blocks:

(i) Administered Objects

JMS application offers two different types of administered objects namely:

  • Connection Factory – The connection factory is used to establish connection with the provider.

  • Destination – The Destination indicates where the produced messages are targeted to and the source of messages that are consumed.

The connection factory and destination are created in the JMI provider with the help of admin console of the application server. These objects will be stored in the JNDI directory of application server.

(ii) JMS Connection

JMS Connection refers to the virtual connection that is established with the provider.

(iii) JMS Session

JMS Session is used for creating the Message Producers (to produce messages) and Message Consumers (to consume messages).

(iv) JMS Message Producer

JMS Message Producer is an object that is intended to send messages to the corresponding Destination.

(v) JMS Message Consumer

JMS Message Consumer is an object that is intended to receive messages that are sent at a particular Destination.

(vi) JMS Message Listener

JMS Message Listener is an object which tends to behave as asynchronous event handler for the messages. When a message arrives at a destination, corresponding set of actions to be taken place is defined in the JMS Message Listener.

Related Posts

  • Differences between Point to Point Messaging Model and Publish Subscribe Messaging Model
  • Point to Point Messaging Model Architecture
  • Publish Subscribe Messaging Model Architecture
  • How JMS is different from RPC?
  • Different types of messages available in JMS API
  • Advantages of Java Message Service (JMS)
  • What is JavaServer Pages (JSP)?
  • Java EE or J2EE Architecture

Filed Under: J2EE Tagged With: Connection Factory, Destination, Java Message Service, JMS, JMS Connection, JMS Message Consumer, JMS Message Listener, JMS Message Producer, JMS Programming Model, JMS Session

Primary Sidebar

FOLLOW US ONLINE

  • View J2eereference-166104970118637’s profile on Facebook
  • View j2eereference’s profile on Twitter
  • View j2eereference’s profile on LinkedIn

Subscribe by email

Recent posts

  • What is parallel Stream
  • reduce method of the Stream class
  • Difference between the findFirst() and findAny() method
  • intern() method of String class
  • SOLID – Five principles of object-oriented software design
  • Java Coding Best Practices
  • How to use lambda expression effectively
  • Enhanced pseudo-Random Number Generators in java17
  • How to use Foreign-Memory Access API
  • Pattern Matching for instanceof
  • Text Blocks – Feature added in Java17
  • Record – The new feature added in java 17
  • What is Sealed Class
  • Features added in Java 17
  • Java Buzzwords

Footer

Core Java
Design Patterns
JSP
Servlets
HTML
Building Tools
AJAX
SCJP
jQuery
Testing
Spring
UML
Struts
Java Centers
Java Training
Home
About Us
Contact Us
Copyright © j2eereference.com. All right reserved.