> Hello,
> I have a hard time understanding several terminologies in j2ee,
[quoted text clipped - 5 lines]
>
> Thanks a lot. My head hurts with this j2ee stack!!!
Hope I do not screw something up while oversimplifying it :)
RMI is Java's answer to object based distributed computing. It is a
binary protocol (JRMP - to add to the terminology - Java Remote Method
Protocol) to access remote objects. It is very similar to CORBA/IDL
methodology. RMI uses rmiregistry as the "factory" to instantiate
remote objects. However, this was a plain vanilla implementation, with
no support (out of the box) for remote object lifecycle management,
security, transaction management, etc. Then came EJBs as overloaded
"RMI" objects, which provide a lot more features out of the box than
you could have on your own using remote objects. EJBs use RMI over
IIOP, which enables an EJB to be accessed by CORBA based clients (I
could be wrong on this one!). JNDI is a lookup service that the clients
can use to look up remote objects, and the providers can use to
register their objects. RMI does not need a container maintaing its
lifecycle, while EJBs can only survive in an EJB container, or a J2EE
server. Under the hood, EJBs use more or less same terminology as RMI
(Remote Interface, Implementation, Stubs, Skeletons, Remote Exceptions)
but from a server standpoint, they are a lot different.
-cheers,
Manish
> I have a hard time understanding several terminologies in j2ee,
> especially with EJB.
> I know EJB is spec to transfer objects across JVM. And EJB always
> associates with RMI. And RMI always goes with JDNI.
> Could somebody explain in plain english what those technologies related
> to each other?
RMI is a Java client/server technology for standalone
server apps.
EJB's are business components inside a container.
How much EJB calls are reusing from RMI calls is not
something you shoudl worry about.
JNDI is an API for directory services. And it is
used to lookup EJB's (or at least their home interfaces).
Arne