EJB is a specification, which provides server side applications that communicate with remote clients to provide a given processing function. By definition, EJBs are part of a client/server system. They normally do no function by themselves without any intraction from a client. The client could be a java bean or other non-java objects on the network.

Types of EJBs

EJBs are two types:

1- Session Bean
         Stateful Session Bean
         Stateless Session Bean

2-Entity Bean
      Container Managed Persistence
            File
            JDBC
         
Bean Managed Persistence
          File
         JDBC

Difference between Entity bean and session bean

An Entity Bean is client independent and has a long life. It needs to maintain an identity for each specific instance. But a session bean is client dependent and exists to serve a single client request and, basically, just disappears after that.

Leave Comment