> I have been working for years with Perl and
> PHP, but I am new to J2EE. I would like to understand
> a bit how it works. I've read a few papers/tutorials,
> but all seem to assume what the home, local and
> remote interfaces are.
Home interfaces let you create instances of EJBs on the application
server. EJBs are possibly remote, so "new BlaEJB()" does not work here.
For Entity Beans, you will have methods to find instances in the home
interface, at least by the bean's primary key. More methods recommended.
The remote interface is one that extends javax.ejb.EJBObject (and
java.rmi.Remote), it's methods may therefore be invoked from another
machine. You put the methods that should be accessible for clients here,
throwing RemoteException or a superclass in every method.
When deploying, your application server creates a Skeleton that
delegates calls to the actual bean.
About the local interfaces - you still have this kind of instance hiding
here (Client -> Delegate -- delegates to --> EJB), but it's call by
reference again so there's no performance overhead.
Johann

Signature
Geh' sterben, einfach strukturierter Junge. Du bist nur Aas, das nach
Bestattung ächzt.
("Ray Banana" in <20021116225404.1251.qmail@gacracker.org>)
Marcus Beyer - 06 Nov 2003 15:24 GMT
> About the local interfaces - you still have this kind of instance hiding
> here (Client -> Delegate -- delegates to --> EJB), but it's call by
> reference again so there's no performance overhead.
Local interfaces can be used if the caller is on the same VM.
Local interfaces are necessary for Container-Managed Relationships.
Marcus