View RSS Feed

EJB Bean

EJB Bean

  1. The lifecycle of stateless bean

    by
    EJB
    , 01-02-2012 at 06:03 PM
    Stateless session bean’s life cycle consists of 2 stages namely; ready for the invocation of the business method and non existent. Client initiates the life cycle by seeking references towards the stateless bean. Dependency injection is performed by the container and then the method annotated @PostConstruct is invoked. Now bean is ready to invoke the business methods by client. Method annotated @PreDestroy is called by the EJB container at the end of life cycle, if any. Then for garbage collection, ...
    Categories
    EJB Bean
  2. When to use Session Beans

    by
    EJB
    , 01-02-2012 at 05:57 PM
    Just one client can access the bean instance at any given time. There exists no persistency in case of state of the bean. They just exist for shorter time duration.

    State full session beans are suitable whenever:

    • The state of bean presents the interaction b/w a specific client and the bean.
    • The bean requires retention of certain information regarding the client, across method invocations.
    • There occurs the mediation b/w other application components and client
    ...
    Tags: session bean Add / Edit Tags
    Categories
    Session Bean , EJB Bean
  3. Stateless Session Bean

    by
    EJB
    , 01-02-2012 at 05:55 PM
    A stateless session (EJB Component) is an enterprise bean which gives its users a stateless service. Interface javax.ejb.SessionBean is implemented by the stateless session bean (EJB Component) and deploys to the “stateless” declarative attribute. They are known as “stateless” as conversational states are not maintained by them that are specific to the client’s session. Stateless session beans are same as the static methods or procedural applications; no instance state is present therefore to execute ...

    Updated 01-14-2012 at 06:14 PM by EJB

    Categories
    Session Bean , EJB Bean