An (almost) minimal project to test OpenEJB with Jetty. Ignore its Hibernate and JAX-RS stuff - they're irrelevant.
Get OpenEJB:
- Download OpenEJB Standalone 7.0.3 from TomEE downloads, expand it, then put it somewhere suitable (eg. /devel/apache-openejb-7.0.3).
Get dependent files:
-
Run Ant file build.xml target get-dependent-files.
-
As a sanity check, check these directories now contain JAR files:
business/src/main/lib-*
business/src/test/lib-*
web/src/main/lib-*
web/src/test/lib-*
Clean:
- Run Ant file build2.xml (NOTE THE "2" IN THE FILENAME) target clean.
- As a sanity check, confirm that collapsed/ is now empty.
Compile:
- Run Ant file build2.xml target compile.
- As a sanity check, confirm that collapsed/ now contains a WAR file in collapsed EAR format.
Run:
-
Open runjetty.sh for edit. Examine PROJECT and OPENEJB: they are directory paths, without trailing slashes. Modify them as necessary.
-
On a command line, go to the project root. Check that runjetty.sh is executable. Then run it:
./runjetty.sh
-
Wait until a message like this appears in the console log:
INFO [main] (Server.java:379) - Started @7249ms
-
In a web browser, go to http://localhost:8080/xpro.
-
Click on the first link. Expect it to return the same page, and to have logged some entries starting with >>>>, eg.
In PretendFinderService.findSomething()
-
Click on the second link. Expect it to fail, with NPE:
Caused by: java.lang.NullPointerException at com.goxpro.xpro.business.domain.base.UsernameCacheRefresher.refreshUsernameCache(UsernameCacheRefresher.java:40)