What is Enterprise Java Beans(EJB) and what are it’s components

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:

  1. Session beans. Below are the types of session beans, they all perform business service operations
    1. Stateless
    2. Stateful
    3. Singleton
  2. Message driven beans are invoked asynchronously in response to external events through association with messaging queue.
  3. 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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s