• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

elaborate the reason for Local interface with EJB 2.0 CMR

 
Edy Yu
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody explain in details why adding local interface support in EJB 2.0 is critical for CMR?
Thanks in advance ...
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the EJB spec 2.0, Section 1.2 states:

We have defined local interfaces and local home interfaces for session beans and entity beans to provide support for lightweight access from enterprise beans that are local clients. Local interfaces allow session beans and entity beans to be tightly coupled with their clients and to be directly accessed without the overhead typically associated with remote method calls. Local interfaces also provide the foundation for container-managed relationships among entity beans with container-managed persistence.

Moreover, according to section 9.3, in order to participate in a container-managed relationship, an entity bean MUST provide a local interface.
 
Edy Yu
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for you reply.
Could you provide more detailed explantion? Maybe a couple of real examples.
Thanks in advance.
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check out the following thread which contains a sort of detailed explanation on CMR.
http://www.coderanch.com/t/159118/java-EJB-SCBCD/certification/Remote-Local
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic