• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJBObject means

 
Gunaselan Varathan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Can you help me to understand EJBObject

in ejb books, Dose EJB Object means

1) EJB proxy, exist for a client
2) Ejb object, an instace of ejb bean
3) EJB remote object

or any other
 
Mahesh Desai
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case of session and entity bean, client can not call bean methods directly instead it would always go through the interfaces. There are two types of interfaces 1] Home interfaces 2] Component interfaces. An instance of a class that implements component interface is called an EJBObject. The container constructs an EJBObject by instantiating the class that implements the component interface. So every time when client want to interact with bean, he has to go through this EJBObject. The client cannot have direct access to the bean instance, the bean client communicates with the bean instance through an EJBObject associated with the bean instance. EJBObject acts as a mediator between client and bean instance.

Hope this help!!!


Thanks,
Mahesh

--------------------
SCJP 1.4 |SCWCD 1.4 | SCBCD 1.3 | SCEA Part I - In Progress
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJBObject acts as the bodyguard of the beans.No one is suppose to access the beans directly .Everyone has to go through the bodyguard(Head First terminology).Except for MDB which doesnot have a client view and the container calls methods on the MDB on getting message in the Queue/Topic.
 
Gunaselan Varathan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mahesh, if i understood correctly.

EJBObject is like a skeleton in rmi terms. which is a mediator between the client request and the bean instance.


did i understood correctly.
 
Mahesh Desai
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guna,

Skeleton and EJBObject are two different concepts. Skeleton object and the EJBObject reside on the app server along with the bean class. Skeleton´┐Żs responsibilities includes: 1] receiving request from the client/stub across the network 2] de-serializing (Unmarshaling) client's request and invoke the corresponding method on the EJBObject 3] serialize (marshalling) the return value backs to the client/stub.


Thanks,
Mahesh


------------------
SCJP 1.4 |SCWCD 1.4 | SCBCD 1.3 | SCEA Part I - In Progress
[ April 27, 2007: Message edited by: Mahesh Desai ]
 
Gunaselan Varathan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mahesh and Rahul.

i am clear now.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic