• Post Reply Bookmark Topic Watch Topic
  • New Topic

Home Object and Remote Object ?  RSS feed

 
manish basotia
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
we have home object and ejbObject in EJB's .
and both of them extends remote object. my doubt is why
cant we have a single object in which we can have home and ejbobject methods
as both are remote? what difference it makes by keeping separate objetcs.
may be this question is silly but for my knowledge sake i want to know.
Thanks
 
kalpak pillai
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Home objects contains Factroy methods that is used only to create ejbObject,
Whereas ejbObject acctualy contains the Business Logic methods.
This is maintained so for code clarity and modularization I hope.Also
u'r container is going 2 maintain the objects in the Server (Bean instance)
if u have a way to get a Bean Instance reference (EjbObject) then how the object pooling and other Container Specific Services like Object Caching etc will be done?

"An idiot can write code that computer can understand and compile, But only a good programmer can write code that human being can understand"
 
manish basotia
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kalpak
thanks for your reply.
Now what i understood the only main reason for having Home object and remote Object is that remote Object should not be available to client
directly. Secondly if we merge both then there will be issues with respect
to instantiation.
Is there anything else... Please correct me.
Others are also welcome.

Thanks
Manish
 
manish basotia
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any others reason ?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!