Author: techfox9
J2EE 1.4 EJBs Notes..
Thursday, October 22nd, 2009 @ 12:24 am
- — Type of Enterprise Beans Session, Entity and Message (-Driven)
- — A session bean represents a single client inside the Application Server .
- –>> 2 types of session beans: stateless and stateful .
- –>> A stateless session bean (SLSB) does not maintain a conversational state for the client.
- –>> In a stateful session bean (SFSB), the instance variables represent the state of a unique client-bean session.
- — An entity bean represents a business object in a persistent storage mechanism.
- –>> Entity beans are persistent, allow shared access, have primary keys, and can participate in relationships with other entity beans.
- –>> Two types of persistence for entity beans: bean-managed persistence (BMP) and container-managed persistence (CMP).
- –>> Part of an entity bean’s deployment descriptor, the abstract schema defines the
bean’s persistent fields and relationships. - –>> Persistence factors:
–>>– persistent fields
–>>– Relationship Fields: 1-to-1, many-to-many, etc..), bidirectional or unidirectional - — Message-Driven beans – JMS
- — JCM = J2EE Core Model.
- — Interfaces: EJBHome, EJBObject, SessionBean,
JBoss 4 EJBs – http://docs.jboss.org/jbossas/guides/j2eeguide/r2/en/html/ch5.chapter.html
Remote:
extends EJBObject
extends EJBHome
Local:
extends EJBLocalObject
extends EJBLocalHome
implements javax.ejb.SessionBean
implements EntityBean