An Enterprise Java Bean (EJB) is a server-side software component that can be deployed in a distributed multi tier environment.
An EJB container can hold four major categories of beans:
Session Beans
Stateless Session Beans
Stateful Session Beans
Entity Beans
Message Driven Beans (MDBs or Message Beans)
EJBs used in shark are session beans (stateless and stateful).
Stateless Session Beans are distributed objects that do not have state associated with them thus allowing concurrent access to the bean. The contents of instance variables are not guaranteed to be preserved across method calls. The lack of overhead to maintain a conversation with the calling program makes them less resource-intensive than stateful beans.
Session beans are used to implement business objects that hold client-specific business logic. The state of an object consists of the values of its instance variables. In a stateful session bean, the instance variables represent the state of a unique client-bean session. Because the client interacts with its bean, this state is often called the conversational state.
Note: The shark beans build process is done and tested for JOnAS Tomcat (4.5.2, 4.7.5), JBOSS (4.x) and Geronimo Tomcat 1.1.1 EJB containers.