blob: 7cf84b4046f4074562793572fa13c12f8df5d983 [file] [log] [blame]
h1. 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/].
h1. 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:
!http://www.rempl.com/rempl-oss/tikz/architecture-components.png!
Presentation Layer includes JSF (Mojarra), JAX-RS (Jersey), and JEE container (Tomcat). In other words, everything on top of "[Delegates|http://www.rempl.com/rempl-oss/apidocs/com/rempl/oss/delegates/package-summary.html]" 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] JEE design patterns. _More about it later..._
Business Layer includes EJB (OpenEJB), [Brokers|http://www.rempl.com/rempl-oss/apidocs/com/rempl/oss/brokers/package-summary.html] (Stateless Session Beans), and JPA entities.
Persistence Layer includes JPA (OpenJPA), JDBC (MySQL JDBC Driver) and the MySQL server.
h1. Build Automation and Tests
Build automation is managed by [Maven 3|http://maven.apache.org/ref/3.0/], 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:
# Static analysis
# Out-of-container unit testing
# In-container functional testing
# On-location testing
During static analysis we are using [Checkstyle|http://maven.apache.org/plugins/maven-checkstyle-plugin/], [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|http://trac.fazend.com/rempl/browser/rempl/trunk/rempl/rempl-oss/src/test/java/com/rempl/oss/brokers/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..._
h1. Configuration and Plumbing
TBD...
h1. Implementation
TBD...