When to use EJBLocalObject ?

Discussions

EJB programming & troubleshooting: When to use EJBLocalObject ?

  1. When to use EJBLocalObject ? (3 messages)

    Dear friends,
    I m learning EJB2.0 and confused at one point.
    => When to use EJBLocalObject and when to use EJBObject(remote) to write remote interface - who provide signature for business methods ?

    Please tell me the implications if any.

    Thanks, Dharmin
  2. Re: When to use EJBLocalObject ?[ Go to top ]

    EJBLocalObject is used when u want to implement CMR among the entity beans while the EJBObject is used when u want to make yr bean remotely available. CMR can only be implemented using local object.

    The signature of the business methods are provided by the container as it is the EJB-Container contract.
  3. hi Dharmin,
               EJBObject as pointed out correctly is used when u r calling the Object Remotely, i.e a client which is not within the web/app server environment.
    Earlier(prior to EJB 2.0) all servlets/EJBs/JSps had to make a remote call even if accessing EJBs within the same container/environment.

    With EJB 2.0 u have the option and surely must use Local calling for servlets/JSPs/Server side components accesing EJBs, the overhead involved is reduced drastically.

    Hope that answers ur query :-)

    bye
    --- LION KING
  4. Hi,

    Yah LION KING is Perfectly rite :).

    Due to overhead,Network Traffic,N performance issues ejb2.0 has come up with this idea of 2 interfaces.