Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

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:

  • OpenEJB as an implementation of EJB
  • OpenJPA, an implementation of JPA
  • Jersey, implementation of JAX-RS
  • Mojarra, implementation of Java Server Faces (JSF)

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

Presentation Layer includes JSF (Mojarra), JAX-RS (Jersey), and JEE container (Tomcat). In other words, everything on top of "Delegates" in the diagram. Package com.rempl.oss.delegates with its classes realize Business Delegate and Service Locator JEE 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.

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, FindBugs, Cobertura, maven-dependency-plugin, 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...