aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Confused of Local Interface and Remote Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Confused of Local Interface and Remote Interface" Watch "Confused of Local Interface and Remote Interface" New topic
Author

Confused of Local Interface and Remote Interface

Stephen Lee
Ranch Hand

Joined: Dec 11, 2001
Posts: 74
I am very new to EJB. After reading some materials and trying some samples, I understand the concept of Local Interface and Remote Interface. However, I am still confused of difference between Remote Interface and Local Interface. When should I use them?
I am now creating a servlet which calls a session bean while this session bean will call the entity bean for the data. The session bean is Remote Interface while I want to call the entity bean of Local Interface (I am trying to follow an example in the book of Mastering of EJB). However, it fails to call the entity bean. It says something of naming exception. When I call the entity bean with Remote Interface, it is successful. Why does this happen?
Stephen
SAFROLE YUTANI
Ranch Hand

Joined: Jul 06, 2001
Posts: 257
Are you sure you defined a JNDI name for the local interface? You need 1 JNDI name for the remote interface, and 1 JNDI name for the local interface. Both are usually specified in a vendor-specific deployment descriptor. For the case of Weblogic, this file is weblogic-jar.xml.
SAF
Karl Laird
Ranch Hand

Joined: Jul 14, 2001
Posts: 67
Are they both deployed in the same naming context and container? To use the local interface beans must be colocated within the same EAR, and use the same naming context in the .xml descriptor


The Eagle sneers at the Peacock<p>Systems Administrator<br />OrderWare Solutions Ltd<br /><a href="http://www.orderware.net" target="_blank" rel="nofollow">http://www.orderware.net</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Confused of Local Interface and Remote Interface