Book Image

Java EE 7 Development with NetBeans 8

By : David R Heffelfinger
5 (1)
Book Image

Java EE 7 Development with NetBeans 8

5 (1)
By: David R Heffelfinger

Overview of this book

Table of Contents (18 chapters)
Java EE 7 Development with NetBeans 8
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introducing session beans


Session beans encapsulate business logic for enterprise applications. It is a good idea to use session beans when developing enterprise applications, since we (as application developers) can focus on developing business logic without worrying about other enterprise application requirements such as scalability, security, transactions, and so on.

Note

Even though we don't directly implement common enterprise application requirements such as transactions and security, we can configure these services via annotations.

There are three types of session beans: stateless session beans, stateful session beans, and singleton session beans. Stateful session beans maintain conversational state with their client between method invocations, where stateless session beans do not. There exists only one instance of a singleton session bean in an application, whereas several instances are created by the application server for stateless and stateful session beans.