Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in EJB 3 Spec.

 
ryan sukale
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

I have a doubt in the specification.

"The class that
implements the session bean’s business interface and the class that implements a session
bean’s component interface delegate an invocation of a business method to the matching business
method that is implemented in the session bean class"

--As given in the "ejb-3_0-fr-spec-ejbcore.pdf" on page 71.

I am unable to understand what does the spec mean when it is talking about a "business interface" and a "component interface". In all the examples that i have seen till now, i have always come across cases where we create a business interface, declare it as remote or local, then we create a session bean that implements the business interface. So i am clearly in a fix when the spec mentions anything about a component interface. Has it got something to do with EJB 2.1?

Or is the spec trying to tell me something about container intervention in the calling of a session bean method.

I would be glad if someone could just tell me as to what does the spec mean by the above mentioned line.

Thanks in advance. :>

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess it should talk about the style of declaring the interfaces...when it says Business interface, it should mean the EJB 3 style of declaring them and when it says Component Interface, it should be the old EJB 2.x style of declaring them. Well ranchers is this right?
 
ryan sukale
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jothi,

Thanks for the reply. The problem is that i have no knowledge about EJB 2.x. Maybe that's why i was confused. Anyways, i read the spec form the beginning all over again and i suppose that what you are saying is correct. At least that way i got to revise the first 70 pages before moving ahead! lol
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ryan, what Jothi said is correct. EJB3.x is backward compatible so it also supports EJB2.x style of EJBs. In EJB2.x to define the remote/local interfaces of the bean, the bean interfaces had to extend from specific interfaces (javax.ejb.EJBObject/javax.ejb.EJBLocalObject). Such interfaces are referred to as the component interfaces. In simple terms, component interfaces refer to the EJB2.x view of the bean.
 
ryan sukale
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you guys for your help. I finally got it.

Regards,
Ryan Sukale
 
mohsin saleem
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I needed help on EJB 3.
Just wanted to know the book to be read and please someone could share Enthuware exam simulator.....
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohsin,

Welcome to JavaRanch Please create your own separate thread in this forum, since this thread was opened to discuss a different topic.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic