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

EJB(Enterprise JavaBeans)
Previous Home Next

EJB is stands for enterprise java bean. It is a specification provided by Sun Microsystems to develop secured, robust and scalable distributed applications. When run EJB application, you need an application server (EJB Container) such as Jboss, Glassfish, Weblogic, Websphere etc. It performs the following tasks as follows:

  1. Life cycle management,
  2. Security,
  3. Transaction management,
  4. Object pooling.

EJB application is deployed on the server, so it is called server side component also. EJB is a COM (Component Object Model) provided by Microsoft. But, it is different from Java Bean, RMI and Web Services.

Advantages of EJB(Enterprise Java Bean)

There are following advantages of EJB as given below:

  1. EJB container provides System level services to enterprise java beans.
  2. EJB developer just focus on business logic and on solving business problems.
  3. To access EJB free security is provided.
  4. Declarative transactions are provided.
  5. EJBs are cached & pooled. Containers manage the EJB life cycles.
  6. Remote access capabilities are present & are clustered for sake of scalability.
  7. OO concepts are supported for example inheritance.
  8. Usage of attributes or annotation based programming is possible.
  9. Free usage & access of complex resources.
  10. EJB is a standard API due to which applications build on EJB can run on any complaint Java EE web application server.

 

Disadvantages of EJB(Enterprise Java Bean)

There are several disadvantages of EJB as given below:

  1. Requires application server.
  2. Requires only java client. For other language client, you need to go for webservice.
  3. Complex to understand and develop ejb applications.
  4. Complicated and large specification.
  5. Increased time of development.
  6. Complexities are added in comparison with straight Java classes.
  7. Potential to create a more essential, costly & complex solution.
  8. Continual revisions of the specifications.
  9. Lots of resources are used & have also lots of artifacts.
Types of EJB(Enterprise Java Beans)

There are three types of enterprise bean in java as given below:

  1. Session Beans- A session bean encapsulates business logic that can be invoked programmatically by a client over local, remote, or web service client views. A session bean is not persistent, means its data is not saved to a database. EJB Session Beans has three types as below:

    • Stateful Session Bean: In stateful session bean, the state of an object consists of the values of its instance variables. In a stateful session bean, the instance variables represent the state of a unique client / bean session.
    • Stateless Session Bean: In EJB stateless session bean conversational state is not maintained with client. When a client invokes the methods of a stateless bean, the beanís instance variables may contain a state specific to that client but only for the duration of the invocation.
    • Single tone Session Bean: A singleton session bean is instantiated once per application and exists for the whole lifecycle of the java application. A single enterprise bean instance is shared across all the applications clients and it is concurrently accessed by clients.
  2. Message Driven Bean (MDB)- Message Driven Beans ( MDBs ) also known as Message Beans. Message Driven Beans are business objects whose execution is triggered by messages instead of by method calls.

  3. Entity Bean- It encapsulates the state that can be persisted in the database. It is deprecated. Now, it is replaced with JPA (Java Persistent 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: