Most Popular Posts

09/04/2013

What is - EJB - Enterprise Java Bean


TL;DR

EJB - Enterprise Java Beans is a server-side components written in Java programming language that encapsulate business logic of an application.

Types of EJBs: Session, Entity, Message-Driven




Details:


Properties of EJBs:

  • EJB has distributable and deployable business logic to clients
  • EJB is reusable across application servers
  • EJB executed within container that provides management and control services

EJB Modules contain: 
class files for enterprise beans, and EJB DD (Deployment Descriptors). Such modules are packed as JAR files.


There are three types of EJBs:


  • Session
  • Entity
  • Message-driven (v 2.0)


Session EJBs
Session EJB is an object, non-persistent, that lives only between client and EJB. If the user fails to remove the session EJB, it will be removed after a period of time. In order to share the sessions between the clients, we have two types of session EJBs:

  • Stateful - addressed for particular client
  • Stateless - shared among all the clients

Entity EJBs (deprecated)
Entity EJBs are for persistent objects. These are mainly used for mapping DBs with applications. 
Its persistence is delegated to the EJB container or is managed on its own. 
In EJB 3.0, entity beans were superseded by the Java Persistence API (which was subsequently completely separated to its own spec as of EJB 3.1). Entity Beans have been marked as a candidate forpruning as of Java EE 6 [1][2] and are therefore considered a deprecated technology.

Source: http://en.wikipedia.org/wiki/Entity_Bean

Message-Driven EJBs

Message driven beans collect/ retrieve messages in asynchronous mode. When message arrives it usually triggers particular function. Clients can subscribe to specific topics and be informed upon message arrival.

10 comments:

  1. Its very nice article .Thanks a lot! You made a new blog entry to answer my question; I really appreciate your time and effort.
    java training in chennai |
    java training institutes in chennai

    ReplyDelete
  2. Nice tutorial. Thanks for sharing the valuable information. it’s really helpful. Who want to learn this blog most helpful. Keep sharing on updated tutorials…
    python Training institute in Pune
    python Training institute in Chennai
    python Training institute in Bangalore

    ReplyDelete
  3. Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.
    Data Science Training in Chennai
    Data Science course in anna nagar
    Data Science course in chennai
    Data science course in Bangalore
    Data Science course in marathahalli

    ReplyDelete
  4. Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article. thank you for sharing such a great blog with us.
    Best Devops Training in pune
    Microsoft azure training in Bangalore
    Power bi training in Chennai

    ReplyDelete
  5. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
    rpa training in bangalore
    best rpa training in bangalore
    rpa training in pune | rpa course in bangalore
    rpa training in chennai

    ReplyDelete
  6. Thanks for sharing valuable information with us .
    Java Classes in Solapur

    ReplyDelete
  7. infomative blog, keep posting . If you want to learn about java web developer then checkout java course in pune

    ReplyDelete