Book Image

Java EE Development with Eclipse - Second Edition

By : Ram Kulkarni
Book Image

Java EE Development with Eclipse - Second Edition

By: Ram Kulkarni

Overview of this book

<p>Java EE is a technology for developing enterprise class, scalable applications. With recent changes to Java EE specifications, JEE application development has become a lot simpler. However, recent changes have also added many new specifications, some of which compete with existing JEE specification. Along with JEE specifications and APIs, it is also very important to understand the entire application development process and tools that can help simplify and accelerate JEE application development.</p> <p>This guide provides a complete overview of developing JEE applications using Eclipse. The many features of the Eclipse IDE are explained. These enable the rapid development, debugging, testing, and deployment of JEE applications. You’ll explore not just different JEE technologies and how to use them (JSP, JSF, JPA, JDBC, EJB, web services etc.), but also suitable technologies for different scenarios.</p> <p>The book starts with how to set up the development environment for JEE applications and then goes on to describe many JEE specifications in detail, with an emphasis on examples. You’ll learn how to deploy an example application on Tomcat and Glassfish Application Server.</p> <p>You’ll create a simple application that reads from a queue, processes the request, and publishes results to a topic and Eclipse MAT (Memory Analysis Tool) to debug memory issues.</p>
Table of Contents (18 chapters)
Java EE Development with Eclipse Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Types of EJB


The EJB can be of the following types according to the EJB3 specification:

  • Session bean

    • Stateful session bean

    • Stateless session bean

    • Singleton session bean

  • Message-driven bean

We will discuss the details of message-driven bean (MDB) in a later chapter when we talk about the asynchronous processing of requests in a JEE application. In this chapter, we will focus on session beans.

Session bean

In general, session beans are meant to contain methods to execute the main business logic of enterprise applications. Any POJO (which stands for Plain Old Java Object) can be annotated with the appropriate EJB3-specific annotations to make it session bean. Session beans come in three types.

Stateful session bean

One stateful session bean serves requests for one client only. There is one-to-one mapping between the stateful session bean and the client. Therefore, stateful beans can hold the state data for the client between multiple method calls. In our Course Management application, we could use a...