Spring Tutorials

Spring Tutorial

Introduction of Spring Framework

Advantages and Disadvantages of Spring Framework

Features of Spring Framework

Basic concept of Spring Framework

Architecture of Spring Framework

Modules of Spring Framework

Goal of Spring Framework

Create Application of Spring without any IDE

Create Application of Spring in Eclipse IDE

Create Application of Spring in MYEclipse IDE

Important JAR of Spring Framework

IOC container in Spring Framework

Bean and Applicationcontext container in Spring Framework

Example of Spring BeanFactory Container in Spring Framework

Example of Spring ApplicationContext Container in Spring Framework

Bean in Spring Framework

Lifecycle of Bean in Spring Framework

Scope of Bean in Spring Framework

Autowiring in Spring Framework

Dependency Injection in Spring Framework

Constructor-based Dependency Injection Example in Spring Framework

Setter-based Dependency Injection Example in Spring Framework

Introduction of AOP in Spring Framework

Core concept and Goal of AOP in Spring Framework

AOP Proxies in Spring framework

XML Schema Based AOP in Spring Framework

AOP Xml based Configuration Example in Spring Framework

Example of Declaring AOP Advices in Spring Framework

AOP AspectJ Annotation with Example in Spring Framework

Declaring an aspect and pointcut using Annotation in Spring Framework

Declaring AOP Advices using Annotation Example in Spring Framework

DAO support in Spring Framework

Introduction of Spring JDBC Framework in Spring Framework

Introduction of Spring JdbcTemplate in Spring Framework

Example of Spring JdbcTemplate class in Spring framework

Example of Executing SQL statements in Spring Framework

Example of Executing DDL statements in Spring Framework

SQL Stored Procedure in Spring Framework

Example of NamedParameterJdbcTemplate in Spring Framework

Example of RowMapperJdbcTemplate in Spring Framework

Introduction of ORM Framework in Spring Framework

Integration of Spring with Hibernate in Spring Framework

Integration of Spring with JPA in Spring Framework

Introduction of Spring Expression Language (SpEL) in Spring Framework

Example of Spring Expression Language (SpEL) in Spring framework

Example of Spring EL in XML and Annotation in Spring Framework

Language Reference with SpEL in Spring Framework

Operators in Spring Expression Language(SpEL) in Spring Framework

Variable in Spring Expression Language(SpEL) in Spring Framework

Introduction of Spring Framework Transaction Management in Spring Framework

Spring Framework Transaction Abstraction

Spring Declarative Transaction Management in Spring Framework

Spring Programmatic Transaction Management in Spring Framework

Introduction of Spring OXM (Object XML Mapping) in Spring Framework

Integration of Spring with Jaxb Example in Spring framework

Example of Spring with Xstream in Spring Framework

Example of Spring with Castor in Spring Framework

Remote Method Invocation(RMI) in Spring Framework

Spring and RMI Integration with Example in Spring Framework

Example of Spring and Httpinvoker in Spring Framework

Example of Spring and Hessian in Spring Framework

Integration of Spring with JMS in Spring Framework

Introduction of Webservice in Spring Framework

Spring Web Services in Spring Framework

Web Services with Jax-WS in Spring framework

Exposing and Exporting servlet-based Web Services using JAX-WS in Spring Framework

Accessing Web Services using JAX-WS in Spring Framework

Introduction of JMS in Spring Framework

JMS Messaging Models in Spring Framework

Using Spring JMS in Spring Framework

Sending and Receiving a Message Using JMS API in Spring Framework

Introduction of JMX (Java Management Extension) in Spring Framework

Integrating Beans with JMX in Spring Framework

Creating a MBeanServer in Spring Framework

Introduction Java Mail with Spring in Spring Framework

Example of Java Mail with spring in Spring Framework

Introduction of EJB(Enterprise JavaBeans) in Spring Framework

Introduction of EJB(Enterprise JavaBeans) Integration in Spring Framework

Integration of Spring With Struts 2 Example in Spring Framework

Spring MVC

Spring MVC

JMS (Java Message Service)
Previous Home Next

Spring provides a JMS integration framework that simplifies the use of the JMS API much like Spring’s integration does for the JDBC API. JMS (Java Message Service) is an API that provides the facility to create, send and read messages. It provides loosely coupled, reliable and asynchronous communication. JMS is also known as a messaging service. Messaging is a technique to communicate applications or software components. JMS is mainly used to send and receive message from one application to another.

Spring provides a number of message listener containers that are used to create Message-Driven POJOs (MDPs). Spring also provides a declarative way of creating message listeners. The package org.springframework.jms.core provides the core functionality for using JMS. It contains JMS template classes that simplify the use of the JMS by handling the creation and release of resources, much like the JdbcTemplate does for JDBC.

The package org.springframework.jms.support provides JMSException translation functionality. The package org.springframework.jms.support.converter provides a MessageConverter abstraction to convert between Java objects and JMS messages. The package org.springframework.jms.support.destination provides various strategies for managing JMS destinations, such as providing a service locator for destinations stored in JNDI.

The package org.springframework.jms.annotation provides the necessary infrastructure to support annotation-driven listener endpoints using @JmsListener. The package org.springframework.jms.config provides the parser implementation for the jms namespace as well the java config support to configure listener containers and create listener endpoints. Finally, the package org.springframework.jms.connection provides an implementation of the ConnectionFactory suitable for use in standalone applications.

Requirement and Advantages of JMS

In this topic we define why to need of JMS API Generally, user sends message to application. But, if we want to send message from one application to another, we need to use JMS API. Consider a scenario, one application A is running in DELHI and another application B is running in MUMBAI. To send message from A application to B, we need to use JMS API. The Main Advantages of JMS API are as follows:

  1. Asynchronous: A JMS provider can deliver messages to a client as they arrive; a client does not have to request messages in order to receive them.
  2. Reliable: The JMS API can ensure that a message is delivered once and only once. Lower levels of reliability are available for applications that can afford to miss messages or to receive duplicate messages.
JMS API Architecture

 

The main components of JMS API are below here.

  1. JMS Client: The Java application which produces/consumes message is known as JMS Client.
  2. Service Provider: A messaging system which implements the JMS interfaces.There are Many service providers are available. Examples are open JMS , JBoss Messaging.
  3. Messages: Messages are objects using to communicate between clients.
  4. Administered Objects: These are preconfigured objects. Two types of administered objects are destinations and connection factories.
    • Connection factory: It is an administered object with which a connection between JMS client and Service provider is establishing.
    • Destination: Destination is the object into which a JMS client targets its messages. Also the JMS client receives messages from the destination. And hence the JMS system is loosely coupled .
  5. Native Clients: They uses Message Products native API instead of JMS API.
Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: