This exercise consists of multiple projects that are integrated into a single JavaEE application; root project, Impl (BOs,DAOs, and BL) project, EJB project, WAR project, EAR project, and RMI Test project.
The root project is the parent to each of the other projects and can be used to invoke targets that apply to all children. This project is known as a reactor or "pom" project since it has no artifacts other than a pom.xml (and children). The root project also acts as a source for properties, dependencyManagement, pluginManagement, and repository sources that we want to keep consistent accross the sub-modules.
The Impl project contains implementation code for the business rules (business logic and business objects) and data access tier. This has been the focus of other exercises and will not be dissected here.
The EJB project will host the session beans, define the remote and local interfaces for the application, and host the application within the application server. The EJB container running within the application server will provide a runtime environment, thread management, resource management, transaction management and security (transactions are not currently part of this exercise).
The WAR project will provide an HTML-based web interface for the clients to access the application. It will interface to the application using the local interface.
The EAR project will provide a composite deployment unit to the application server. It will consist of the EJB and WAR modules as well as any dependencies that they define.
The RMI Test project will provide a demonstration of the RMI client actions and a test of the application from the RMI interface.
Your final source tree will look like the following.
javaeeEx |-- javaeeExEAR | `-- pom.xml |-- javaeeExEJB | |-- pom.xml | `-- src | `-- main | |-- java | | `-- myorg | | `-- javaeeex | | |-- cdi | | | `-- ResourceConfig.java | | |-- dto | | | |-- AddressDTO.java | | | `-- PersonDTO.java | | `-- ejb | | |-- RegistrarEJB.java | | |-- RegistrarLocal.java | | |-- RegistrarRemote.java | | |-- TestUtilEJB.java | | `-- TestUtilRemote.java | `-- resources | `-- META-INF | |-- beans.xml | |-- persistence.xml | `-- jboss-ejb3.xml |-- javaeeExImpl | |-- pom.xml | `-- src | |-- main | | |-- java | | | `-- myorg | | | `-- javaeeex | | | |-- bl | | | | |-- RegistrarException.java | | | | |-- Registrar.java | | | | `-- TestUtil.java | | | |-- blimpl | | | | |-- RegistrarImpl.java | | | | `-- TestUtilImpl.java | | | |-- bo | | | | |-- Address.java | | | | `-- Person.java | | | |-- dao | | | | |-- PersonDAOException.java | | | | `-- PersonDAO.java | | | `-- jpa | | | |-- DBUtil.java | | | `-- JPAPersonDAO.java | | `-- resources | | `-- META-INF | | `-- orm.xml | `-- test | |-- java | | `-- myorg | | `-- javaeeex | | |-- blimpl | | | |-- RegistrarImplTest.java | | | `-- TestUtilTest.java | | |-- cdi | | | `-- JavaeeEx.java | | |-- bo | | | `-- PersonTest.java | | `-- jpa | | |-- DBUtilTest.java | | |-- DemoBase.java | | `-- JPAPersonDAOTest.java | `-- resources | |-- log4j.xml | `-- META-INF | |-- beans.xml | `-- persistence.xml -- javaeeExTest | |-- pom.xml | `-- src | `-- test | |-- java | | `-- myorg | | `-- javaeeex | | `-- ejbclient | | `-- RegistrarIT.java | `-- resources | |-- jndi.properties | `-- log4j.xml |-- javaeeExWAR | |-- pom.xml | `-- src | |-- main | | |-- java | | | `-- myorg | | | `-- javaeeex | | | `-- web | | | |-- JPAFilter.java | | | |-- RegistrarHandlerServlet.java | | | `-- RegistrarWebConfig.java | | `-- webapp | | |-- admin | | | `-- admin_menu.jsp | | |-- index.jsp | | `-- WEB-INF | | |-- beans.xml | | |-- content | | | |-- DisplayException.jsp | | | |-- DisplayPeople.jsp | | | |-- DisplayPerson.jsp | | | |-- DisplayResult.jsp | | | |-- ErrorPage.jsp | | | |-- LoginFailure.jsp | | | |-- Login.jsp | | | `-- UnknownCommand.jsp | | |-- jboss-web.xml | | `-- web.xml | `-- test | |-- resources | | |-- jndi.properties | | `-- log4j.xml | `-- webapp | `-- WEB-INF | `-- web.xml `-- pom.xml