Book Image

WildFly Performance Tuning

Book Image

WildFly Performance Tuning

Overview of this book

Table of Contents (17 chapters)
WildFly Performance Tuning
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

The different types of EJBs


Here, we will give you a brief introduction of the different EJB types.

Stateless Session Beans (SLSB)

Stateless Session Beans (SLSB) are business objects that do not have a state associated with them; they are typically used for one-off operations such as fetching a list of elements from a legacy system. Instances of stateless session beans may be pooled. If they are pooled and a client accesses one of them, the EJB container checks whether there are any available instances in the pool. If any available instance is present, the instance is returned to the client.

If no instances are available, the container creates a new instance (unless the pool has reached its max size) that will be returned to the client. In this case, the number of clients that can be served is not unlimited.

As mentioned previously, some implementations don't use a pool. In these cases, instances are normally created and destroyed with each invocation. This might be slower than using a pool...