Entity Bean

Why Trust Techopedia

What Does Entity Bean Mean?

An entity bean, in the context of Java Platform 2, Enterprise Edition (J2EE), represents the business objects retained at the end of a session in a persistent storage mechanism. Busi.ness objects may include items like customer name, account number and/or account balance, etc


In J2EE, a relational database is a persistent storage mechanism. In a relational database, there is a table for each entity bean and every bean instance corresponds to a particular table row.

The following are characteristics differentiating entity beans from session beans:

  • Entity beans are retained after the end of a session, unlike session beans.
  • Entity beans permit shared data access.
  • Entity beans have a primary key or a unique identifier.

Techopedia Explains Entity Bean

The two different types of entity bean persistence are bean-managed and container-managed. An entity bean is persistent because it is stored in a relational database, where data exists after a session ends.

Multiple clients may share entity beans. Entity transaction management is important because at any given time, different clients may need to access and change the same data. Each bean’s transaction management is provided by the Enterprise JavaBeans (EJB) container, which guarantees data integrity.

Each entity bean is identified by a unique object identifier, which is used by the client to locate a specific entity bean.

Entity beans may be used when a bean is a business object and not a method. For example, a bank account is a business object, whereas bank account verification is a business method. An entity beam may also be used if a bean’s state should remain persistent.


Related Terms

Margaret Rouse
Senior Editor
Margaret Rouse
Senior Editor

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.