| Author |
Doubt in EJB 3 Spec.
|
ryan sukale
Ranch Hand
Joined: Aug 11, 2007
Posts: 53
|
|
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. :>
|
SCJP 5.0, SCWCD 5.0, SCBCD 5.0
|
 |
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
|
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?
|
SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
|
 |
ryan sukale
Ranch Hand
Joined: Aug 11, 2007
Posts: 53
|
|
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
Joined: Jul 20, 2005
Posts: 8143
|
|
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.
|
[My Blog] [JavaRanch Journal]
|
 |
ryan sukale
Ranch Hand
Joined: Aug 11, 2007
Posts: 53
|
|
Thank you guys for your help. I finally got it.
Regards,
Ryan Sukale
|
 |
mohsin saleem
Greenhorn
Joined: Feb 16, 2003
Posts: 1
|
|
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
Joined: Jul 20, 2005
Posts: 8143
|
|
Mohsin,
Welcome to JavaRanch Please create your own separate thread in this forum, since this thread was opened to discuss a different topic.
|
 |
 |
|
|
subject: Doubt in EJB 3 Spec.
|
|
|