| EJB 2.0 Introduction > Overview | Index - Previous - Next |
Enterprise JavaBeans (EJB) is a server-side component architecture for the development and deployment of distributed object systems for the Java platform. Applications written using the EJB architecture are scalable, transactional, and multi-user secure.
EJB is not a technology that you can test right away like Swing. You have to consider that there is more than one player in the game; an EJB container (usually supplied by 3rd party vendor), a client and the client-jar generated by the 3rd party deployment tool. For this reason, in order to try out my examples it will be also necessary to use Caucho's Resin 3.0. Although EJB should be portable, there are subtle incompatibilities that make difficult to write truly cross-container examples (including table-mapping information).
Entity Bean
- Represents a thing in a persistent store. Usually represents a row in a table.
- An entity bean is something.
Session Bean
- It typically represents a process.
- A session bean does something.
- There are two kinds of Session Beans:
- STATELESS
- Can't remember anything between method calls.
- Forgets about the client once the method call completes.
- Is more scalable than a statefull session bean.
- STATEFUL
- Can remember conversation state or client-specific state.
Message-driven Bean
- Can listen for messages from a JMS messaging service.
- Clients never call message-driven beans directly.
- Has no EJBObject because the requests come from the messaging service.
| © Ernesto Garbarino | Top |