J2EE : EJB terminologies

D

Doug

Hello,
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?

Thanks a lot. My head hurts with this j2ee stack!!!
 
M

Manish Pandit

Doug said:
Hello,
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?

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
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Doug said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,795
Messages
2,569,644
Members
45,358
Latest member
TreyTritt8

Latest Threads

Top