• 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

Confused about getting reference to interface

 
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Could someone explain to me the difference between the following(From EJB3.0 Core specs):

-A reference to an enterprise beans business interface
-A reference to an enterprise beans remote interface.
-A reference to an enterprise beans local interface.

I thought there was only 2 kinds of interface..local and remote.What does the 1st one refer to...?
What is the difference between retrieving an EJBObject\EJBLocalObject as opposed to calling get BusinessObject(Class <T> businessInterface)?Are there differences in capabilities of the returned object or what?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See this
 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh ok so we're actually supposed to refer to the remote interface as the 'business interface' in EJB3.0 to avoid confusion with EJB2.x?

But even though our interfaces no longer extend EJBObject and EJBLocalObject are the following 2 methods of the SessionContext still relevant to EJB3.0:

-getEJBLocalObject
-getEJBObject


 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Duran Harris wrote:Oh ok so we're actually supposed to refer to the remote interface as the 'business interface' in EJB3.0 to avoid confusion with EJB2.x?



If the bean exposes a EJB2.x view through an interface extending the EJBObject or through the <remote> element in the xml, then that interface is known as the remote (component) interface.
If the bean exposes a EJB3.x view through an interface marked with @Remote or <business-remote> element in the xml, then that interface is known as a remote (business) interface.

Same is the case with the "local" counterparts.

Duran Harris wrote:
But even though our interfaces no longer extend EJBObject and EJBLocalObject are the following 2 methods of the SessionContext still relevant to EJB3.0:

-getEJBLocalObject
-getEJBObject




They will throw an IllegalStateException if the bean does not expose the remote (component) interface or the local (component) interface.
 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay thank you then I understand now.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic