Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

E++: A pattern language for J2EE applications, Part 1

Build better J2EE applications with a high-level pattern language

  • Print
  • Feedback

Page 4 of 7

The Web tier needs to know these model changes and be updated. To accomplish this, Web Model JavaBeans, which serve as mirrors of these Model EJBs, are registered as event listeners so that they are notified as soon as the Model EJB changes. The Event Processor employs the Command pattern to update the JavaBeans, which feeds updated data to JSP pages for customer browsing. JSP pages, one of the standard J2EE Web components for application presentation, retrieves data either directly from the mirror JavaBeans or indirectly through JSP tags in case data looping is necessary.

Note that for read-only access, such as catalog browsing, JSP should access the database through Web JavaBeans and bypass EJBs.

B2B flow

Because some of the customer's events require access to backend remote services, we also must focus on the B2B scenario. The REAI (Rule Engine-based Enterprise Application Integration) architecture pattern acts as the framework for conducting B2B integration services.

The Scheduler pattern initiates B2B requests and executes each specific task as a single thread. The thread uses the Integration Rule Engine to figure out the correct XML schema and backend connectivity. The engine, a stateless EJB, leverages the XML DTD design pattern to design its XML schema. Meanwhile, the XML Transformer pattern transfers one XML schema to another so that the sent XML can be understood by receivers. The engine uses the Security pattern to secure the data transportation if required. Integration business rules are scripts residing outside the rule engine, so they can be changed at runtime by nonprogrammers. The engine then takes action using the Dispatcher pattern to get remote services. The Dispatcher pattern uses the Proxy Adapter, Remote Facade Wrapper, and JMS patterns to establish the actual connectivity. Lastly, the Prototype Reality Bridge pattern describes a seamless development evolution from simulation to reality.

Moving on, the Migration pattern demonstrates how Web-centric applications can be moved to an E++-recommended architecture. The Security pattern addresses security related to Internet-based enterprise solutions including confidentiality, integrity, authentication, and nonrepudiation. The Cluster pattern provides rules about how to deploy the framework in production.

Now let's drill down to the detailed patterns starting with the three architectural patterns: Layered Architecture, MVC, and REAI.

In order to describe the patterns, I'll detail each component within a group with:

  • The pattern name
  • The context in which the pattern applies
  • The design problem raised by the context
  • The conflicting forces that must be resolved
  • The solution offered by the pattern


The Architecture pattern

The Architecture pattern expresses a fundamental structure-organization schema for software systems. It provides a set of predefined subsystems, specifies their relationships, and includes rules and guidelines for organizing the relationships among them.

Pattern name: Layered Architecture

Context

You are designing the TSP J2EE application.

  • Print
  • Feedback

Resources