This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confused about getting reference to interface

 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this
 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • 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
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 1
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay thank you then I understand now.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic