Loading
Life Cycles of EJBs

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  Life Cycles of EJBs


  • Life Cycles of EJBs
    Sample Img 10

Ans)

1) Session Beans
 Session beans are intended to allow the application author to easily implement portions of application code in middleware
 and to simplify access to this code.


Session beans are divided into two types:
a)     Stateless Session Bean
b)     State full Session Bean
       a)    Stateless Session Bean
               A stateless session bean does not maintain a conversational state with the client. When a client invokes
               the methods of a stateless bean, the bean’s instance variables may contain a state specific to that client,
               but only for the duration of the invocation. When the method is finished, the client-specific state
               should not be retained.
        b)    State full Session Bean
                The state of an object consists of the values of its instance variables. In a stateful session bean, the
                instance variables represent the state of a unique client-bean session. Because the client interacts (“talks”)
                with its bean, this state is often called the conversational state. The state is retained for the duration of
                the client-bean session.
2) Entity Beans
An entity bean represents a business object in a persistent storage mechanism. Some examples of business objects are
customers, orders, and products. In the J2EE SDK, the persistent storage mechanism is a relational database.

3) Message driven beans
A message-driven bean is an enterprise bean that allows J2EE applications to process messages asynchronously. It acts as a
JMS message listener, which is similar to an event listener except that it receives messages instead of events.

 

Life Cycles :

Stateless Session Bean 
           A stateless session bean has only two states: Does Not Exists and Method Ready Pool. 
    
     Stateful Session Bean 
           Unlike Stateless, a Stateful Session Bean has three states. Does not exists, Method Ready and Passivated states.

      Life Cycle of an Entity Bean 
            An Entity Bean could have three states, Does not exists, Pooled and Ready

      Life Cycle of a Message Driven Bean 
             A Message Driven Bean has two states, Does not exists, Ready



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Life Cycles of EJBs


Life Cycles of EJBs

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free