Business Case

The example explains how a real-life business problem is solved using OpenEJB in a combination with other open-source frameworks and tools. The example covers the entire technical solution, including architecture, design, build automation, unit testing, implementation, and deployment.

The product is hosted at http://oss.rempl.com with its source code available at [http://svn.rempl.com/trunk/rempl/rempl-oss] . The purpose of the system is to collect UML meta information from open source products and make it visible for end-users in form of diagrams and texts. More information about the product and its documentation you can get at [http://www.rempl.com/rempl-oss/] .

Architecture and Design

The following Java-stack technologies are used in the system:

There are three layers in the system (Presentation, Business, and Persistence) and a number of components in each of them:

!http://www.rempl.com/rempl-oss/tikz/architecture-components.png!

Presentation Layer includes JSF (Mojarra), JAX-RS (Jersey), and Java EE container (Tomcat). In other words, everything on top of "Delegates " in the diagram. Package [com.rempl.oss.delegates|http://www.rempl.com/rempl-oss/apidocs/com/rempl/oss/delegates/package-summary.html] with its classes realize [Business Delegate|http://java.sun.com/blueprints/corej2eepatterns/Patterns/BusinessDelegate.html] and [Service Locator|http://java.sun.com/blueprints/corej2eepatterns/Patterns/ServiceLocator.html] Java EE design patterns. More about it later...

Business Layer includes EJB (OpenEJB), Brokers (Stateless Session Beans), and JPA entities.

Persistence Layer includes JPA (OpenJPA), JDBC (MySQL JDBC Driver) and the MySQL server.

Build Automation and Tests

Build automation is managed by Maven 3 , see our [pom.xml|http://trac.fazend.com/rempl/browser/rempl/trunk/rempl/rempl-oss/pom.xml] .

There are four levels of testing in the product:

  1. Static analysis
  2. Out-of-container unit testing
  3. In-container functional testing
  4. On-location testing

During static analysis we are using Checkstyle , [PMD|http://maven.apache.org/plugins/maven-pmd-plugin/] , [FindBugs|http://mojo.codehaus.org/findbugs-maven-plugin/] , [Cobertura|http://mojo.codehaus.org/cobertura-maven-plugin/] , [maven-dependency-plugin|http://maven.apache.org/plugins/maven-dependency-plugin/analyze-only-mojo.html] , [xml-maven-plugin|http://mojo.codehaus.org/xml-maven-plugin/] . Important to note that all these tools are used as gate condition checkers, not as post-factum analyzers. 

Out-of-container tests are automated with JUnit. Good example of a Stateless Session Bean out-of-container testing: UserMgrBeanTest.java .

In-containter functional testing is automated with JSFUnit and embedded Tomcat container. more later...

On-location testing is not yet automated... working on it...

Configuration and Plumbing

TBD...

Implementation

TBD...