aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Why EJB need interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Why EJB need interface" Watch "Why EJB need interface" New topic
Author

Why EJB need interface

karthik kummar
Greenhorn

Joined: Jun 23, 2010
Posts: 11
Hi Friend,
I have one chilly doubt, why we are using interface(LOCAL and REMOTE) in EJB. could you please explain.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

To separate definition from implementation. And in the case of remote so as to not share the implementation.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
nirmal singh
Greenhorn

Joined: Feb 07, 2008
Posts: 6
Hi karthik the reason behind is ejb are built for accessing remote enviroment which is completely different from the working environment.....so as to establish the connection bw a stub and skeleton we use these interfaces as a common skeletal environment.thanks in advance :-))
malgo douginos
Greenhorn

Joined: Jan 08, 2012
Posts: 2
I still don't understand, a program is already written,
so if it calls the third method of the interface it means it ALREADY knew that this method was in the interface, and it also already knew it's signature.
so why bother to retrieve the interface, why not just send "execute methoda(param b);" ?!
James Boswell
Bartender

Joined: Nov 09, 2011
Posts: 973
    
    5

Sounds to me like you need to read up on the benefits of using interfaces. This is more than just an EJB issue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why EJB need interface
 
Similar Threads
EJBHome and EJBRemote interface
why remote interface not implemented?
What is the need for EJB to get reference to Home interface?
ejbCreate in MDB
Home and Remote interfaces