This week's book giveaway is in the Java in General forum.
We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line!
See this thread for details.
Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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: 40912
840
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
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic