"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.
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, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joined: Aug 11, 2007
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
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.