Part I of this
2 Part article introduces Ejb's and how the Inter
Orb Protocol is setup in oracle before you can invoke
EJB's on the server
What are Enterprise Java Beans
(EJB) ?
An EJB can be summarized as a
software component running in the Oracle server.
It is different from a "Java Bean" in that when
instantiated by the client it will reside in the
Java Shared Pool. The EJB is designed to manage
core business logic and functions, ie. "place an
order", "alter my account details", "increase my
salary". The Java Bean still has its place on the
client as "plugins" for GUI widgets for example.
There are two kinds of EJB, the
session bean and the entity bean. A "session bean
implements one or more business tasks while an entity
bean implements a business entity" (Oracle). A business
entity may be a row in a relational table for example
whilst the session bean implements the services
(insert/delete/update) on this entity. Before your
developers start designing that new .com site, be
warned that Oracle v8.1.5 does NOT support entity
beans.
IIOP ( Internet Inter-ORB Protocol
)
For a client to invoke an EJB
on the server, the RMI (Java Remote Invocation)
model is typically used, this clearly defines the
remote access methods and parameter passing architecture
of the EJB. Unfortunately to add to the confusion
Oracle does not use pure RMI, but uses RMI over
IIOP as the transport protocol.
The IIOP (Internet Inter-Orb Protocol)
is an object oriented communications protocol that
allows distributed programs written in different
programming languages to communicate over the internet.
The IIOP is a critical part of CORBA (Common Object
Request Broker Architecture). The core component
of CORBA is the ORB (Object Request Broker).
The "ORB support in a network
of clients and servers on different computers means
that a client program (which may itself be an object)
can request services from a server program or object
without having to understand where the server is
in a distributed network or what the interface to
the server program looks like."
Both CORBA and IIOP assume the
client/server model. When writing a program, the
developer uses an interface called the General Inter-ORB
Protocol (GIOP), in Oracle 8i this is implemented
via MTS. The GIOP is mapped for the IIOP network
transport layer, which passes requests or received
repliues through IIOP using the transmission control
protocol (TCP).
In the Jserver environment, Oracle
includes its own IIOP based protocol that supports
a Jserver session-based ORB. Oracle has taken the
Java ORB from VisiBroker for Java version 3.2 and
repackaged the Java IIOP interpreter for running
in the database. This session IIOP protocol is compatible
with standard IIOP.
The EJB and the CORBA programming
models are implemented on top of this model.
All IIOP connections to the database
must use MTS (Multi-threaded Architecture). An example
of how to setup IIOP connectivity for EJB client
access is shown below: