Enterprise Java Beans(EJB) in my my understanding is required for invocation of some methods on objects on remote machines. In other words, client will have it’s own copy of object perform the desired operation on it’s local machine and this object later will be serialized and sent to remote machine. Ex.: when you use your browser to update your personal information such as phone number, your local machine will create user object, get the updated value of phone number(user object has phone number attribute) then this object sent to the bank’s app server where the app will update the database. That’s it.
There are 3 components of EJB:
- Session beans. Below are the types of session beans, they all perform business service operations
- Message driven beans are invoked asynchronously in response to external events through association with messaging queue.
- Entities are objects that have unique identities and represent persistent business data. Persistent data in human language means write or read data to database.
1 and 2 considered as enterprise beans and 3 is not. (starting from ejb 3.0 entities are not beans)
Very good introduction video about EJB 3.0