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.
@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.
You might also like to view...
How many different orders can all the messages be delivered to each process?
Suppose a multicast group currently is participated by two processes: P1 and P2. Suppose P1 multicasts m11 then m12, P2 multicasts m21 then m22.
Each 0 or 1 is a(n) byte.
Answer the following statement true (T) or false (F)
You can select an element of a chart to format by using the Chart Elements button to the right of a selected chart
Indicate whether the statement is true or false
Which property can be set to indicate whether text in the TextBox is read-only or not?
A. InputOnly B. AcceptsText C. ReadOnly D. TextInputOnly