Java Magazine, Sept/Oct 2018
ORACLE COM JAVAMAGAZINE SEPTEMBER OCTOBER 2018 30 the leading edge Obtaining Projects for Use Within Services EE4J hosts the various projects that make up the Jakarta EE platform As the Jakarta EE platform begins to have full releases there will be Maven coordinates or a location where diferent variations of the Jakarta EE platform can be downloaded and added to a project The platform will likely be available in its entirety or as separate APIs Prior to the oficial release of Jakarta EE the EE4J projects need to be downloaded or added as Maven dependencies separately You can use a couple of paths to obtain the specifications or APIs that are required download the codebases and build them yourself or utilize the Maven Central repository to pull them into the project To download and build an EE4J API visit its corresponding EE4J GitHub project page and find the respective GitHub repository clone the codebase of the project and typically use Maven to build the API Follow the procedures on the respective projects GitHub repository homepage See the Mojarra project for a good example because it contains lots of documentation on how to build and use it in resulting projects Most of the projects simply require the project to be built by issuing mvn clean install and the dependency JAR will be produced The resulting JAR can then be added to a local Maven repository or it can be added directly to a project For the examples in this article I use Maven Central by adding the dependencies to project POM files Note that Maven Central might not yet have true Jakarta EE platform APIs registered within it so some of the APIs still point to the Java EE 8 dependency Developing the Services I created each of the services for the example as Maven projects in Apache NetBeans by selecting New Project Maven Web Application The projects are named as follows SportsTeamQueryService SportsTeamRegistrationService and SportsTeamUIService The following lines of SQL can be used to create the database table Apache Derby for the example You can add the table to the sample Derby schema for convenience If you are using GlassFish 5 or Payara Server 5 to deploy the example the Derby sample schema should already be registered as a JDBC connection
You must have JavaScript enabled to view digital editions.