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/] .
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:
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 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:
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...
All edits are reviewed before going live, so feel free to do much more than fix typos or links. If you see a page that could benefit from an entire rewrite, we'd be thrilled to review it. Don't be surprised if we like it so much we ask you for help with other pages :)NOTICE: unless indicated otherwise on the pages in question, all editable content available from apache.org is presumed to be licensed under the Apache License (AL) version 2.0 and hence all submissions to apache.org treated as formal Contributions under the license terms.