Enterprise Java Beans – notes and summary

Introduction

Key Words: EJB, enterprise java beans

Discuss how we can structure system software for large scale distributed sytem service

Inter Enterprise View

Inter Enterprise View: The motivation of using enterprise java beans

Key Words: monolithic, supply chain model, amalgam, survivability, complexity

From a user perspective, we view a system (like Ebay or Google) as a blackbox. But in reality, much more complex than that and within the system, there may be multiple enterprise working together and this can be difficult when trying to handle failures, complexity, and so on

An Example

Key Words: scheduling, parallel systems, synchronization, communication, atomicity, concurrency, object technology, reuse

Using a system like Expedia, we face same issues in parallel systems like synchronization and concurrency and scheduling and atomicity and so on

N-tier applications

N tier applications

Key Words: concurrency, parallelism, embarrassingly parallel applications

Want to reduce network communication (latency), security (for users) by not compromising business logic, and increase concurrency

Structuring N Tier Applications

Structuring N tier applications

Key Words: JEE, protection domain, bean

We can split the protection domain uses containers, at the client or at the presentation layer, business layer or database layer. Each container contains N beans, bundle of java objects

Design alternative (Coarsegrain session beans)

Coarse grain approach. Although this approach protects business logic from outside network, fails to expose concurrency at the EJB container.

Key Words: monolithic, concurrency

Each session bean is very granular, the session bean encapsulating most of the logic. The upshot of this approach is that the container offers little service and the logic is not exposed outside the corporate network. The downside is that we do not exploit concurrency. There’s a missed opportunity where the EJB container and pull in data for multiple sessions

Design Alternative

Key Words: trade offs, persistent, bean managed persistence, container managed persistence, data access object

With data access object design, we confront the short comings of the coarse grain session bean, by exploiting concurrency for data access, limiting I/O and network latency when accessing the database. The trade off? Business logic is exposed to the web container

Design alternative (session bean with entity bean)

Design alternative: session bean with entity bean. Hybrid approach of coarse grain and data access object.

Key Words: session facade, design pattern, remote interface, RMI

We now embed a session facade, that provides concurrency AND does not exposed business logic. To that end, we use RMI (remote interface) to communicate between the containers and/or between the session facade and entity bean