Explain carefully how component-based middleware in general and EJB in particular can
overcome the key limitations of distributed object middleware. Provide examples to illustrate your
answer.

What will be an ideal response?

The problems and associated solutions are described below.
Implicit dependencies: Component-based middleware get round this issue by having a complete contract
with the environment (and other components) through both required and provided interfaces. Required
interfaces in particular act as declarations of dependencies on other components that need to be there and
bound to this component for it to function correctly. This eliminates implicit dependencies. In EJB, this is
achieved through the mechanism of dependency injection. As an example, consider making calls to a
transaction manager. In distributed object middleware such calls may well be embedded in the code of an
object and this is not visible from outside the encapsulation. In EJB, this would be declared as a dependency,
as in the call the following call taken from Section 8.5.1:
@Resource javax.transaction.UserTransaction ut;
Programming complexity: ?Programming complexity is concerned with the need to make low level calls
to the underlying middleware. This is particularly true in CORBA where the Portable Object Adaptor (POA)
and ORB Core, for example, offers a relatively sophisticated interfaces for areas such as the creation and
management of object references, the management of object lifecycles, activation and passivation policies, the
management of persistent state and policies for mappings to underlying platform resources such as threads.
Components hide these interfaces by doing such management within the container abstraction. EJB does not
have to deal with the complexities of CORBA but still significantly simplifies lifecycle management, for
example.
Lack of separation of distribution concerns: There is additional complexity in managing calls to
distributed systems services such as security or transaction services. Again, this is hidden from the
programmer through the container abstraction. In EJB, this is particularly easy to deal with through a
combination of configuration by exception and the use of annotations to declare requirements more
declaratively. An example is providing support for transaction management which, in the simplest case
(container-managed transactions), can be set up with simple annotations such as:
@TransactionManagement (CONTAINER)
No support for deployment: All component technologies provide support for deployment through the
packaging of components with associated architectural descriptions and deployment descriptors. Tools are
provided to interpret such packaging and deploy the associated configurations. In EJB, jar files fulfil this
purpose.

Computer Science & Information Technology

You might also like to view...

A simplified version of a function which is used to test the main program is called

a. A stub b. Abstraction c. Polymorphism d. A driver

Computer Science & Information Technology

When a user clicks the left mouse button on a control in a form, the ____ event is triggered.

A. Mouse Down B. Click C. Open D. Change

Computer Science & Information Technology