basic EJB questions

Discussions

EJB design: basic EJB questions

  1. basic EJB questions (3 messages)

    Hi,

      Why Entity beans are called fine grained and Session beans are called Course Grained...?


      Unlike Stateless session bean, Stateful session bean create method can be overloaded...?

    --Thanks
    Muraki

    Threaded Messages (3)

  2. basic EJB questions[ Go to top ]

    Why Entity beans are called fine grained and Session beans are called Course Grained...?


    Usually this is posed as Entity Beans vs. Stateless Session Beans. Entity Beans tend to lots of individual getters and setters, each of which manipulate individual fields in a database table. Stateless Session beans manipulate data at a larger level, either with custom JDBC queries that pull out larger blocks of data or by manipulating groups of Entity Beans.

    >Unlike Stateless session bean, Stateful session bean create method can be overloaded...?

    Yes, Stateful Session Beans may have more than one create method.
  3. basic EJB questions[ Go to top ]

    <Stateless Sesssion Bean As Coarse Grained>
    <Answer> As the EJB Specification evolved and more and more projects started using Enterprise Beans as the Middle Tier component of choice,This concept of using Stateles session beans as coarse grained component also evolved

    Usually Stateless session bean method invocation involves calling multiple Entity Bean methods which generally saves the remote calls a client has to make for each entity beans,basically a session bean wraps up all these calls in to a single method invocation hence what is transparent to a client is a Coarse Grained view of the system (Session Facade)

    <Entity Bean as Fine Grained>
    <Answer>since entity beans concerns the data represented by them and hence they cannot be coarse grained.
  4. thanks a lot...!![ Go to top ]

    thanks a lot...!!