• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Local interface and local home interface

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the difference between a local interface and local home interface in EJB? Please help me to find the exact demarcation in the usage of these two interfaces.
 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sudha:
What is the difference between a local interface and local home interface in EJB? Please help me to find the exact demarcation in the usage of these two interfaces.



Local Interface:

When both the session bean and entity bean resides in the same container and session bean make a call to the entity bean, ejb don't reqd to use the remote interface and remote home interface instead they can use local interface and local home interface. It improves the performance and reduces the network problem associated with the remote call.
It is similar to component interface i.e. declares the contracts.

Local Home interface:

Will define the bean life cycle methods.
 
Sudha Ugendran
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi malli,

Thanks for your reply.But could you explain more about this localhome interface and when we use them?

Thanks in advance.
 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sudha:
Hi malli,

Thanks for your reply.But could you explain more about this localhome interface and when we use them?

Thanks in advance.



Hi,

Assume you are having a session bean and a entity bean deployed on the same ejb container and you are using session facade pattern to call a method on entity bean thro a session bean. In this case since both the beans are in the same container, session bean will act as local client to the entity bean and to call the entity bean method you don't reqd to make remote method call( In EJB1.1 we used to do so!! which is reduce the performance & unnecessary too). The Local Component Interface method is available only through the local home interface method.

Regards,
M.S.Raman
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Sudha",

We're pleased to have you here with us in the EJB forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks,
Jeanne
Forum Bartender
 
Sudha Ugendran
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeanne,
Sorry for not following the naming policy.Actually I was in a hurry while filling up MyProfile page and I have made the necessary changes now.

Thanks & Rgds,
Sudha Ugendran
 
LOOK! OVER THERE! (yoink) your tiny ad is now my tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic