Apache TomEE is an increasingly popular certified Java EE server that is based on Tomcat and other Apache libraries like OpenJPA and OpenEJB. The fundamental idea behind the project is to customize the widely beloved Tomcat as little as possible, throw in required (Apache) libraries and certify the result. And the result is a liberally licensed open source Java EE server that is extremely simple, yet powerful and very business friendly.
Rest assured that this server is built by true professionals. The father of TomEE, David Blevins, has a long experience as an author of several Java EE standards and tools you are probably already using today - or have used in the past. To make the option even more compelling for corporations, David recently started a venture called Tomitribe to provide commercial support for TomEE.
David Blevins, Joonas Lehtinen, Fredrik Rönnlund and Matti Tahvonen on a coffee break at Vaadin HQ.
A while ago when David was joining our JFokus cruise on the icy baltic sea, I promised to build some examples of how one can use the Apache Java EE stack with a modern Apache licenced RIA UI library. Yes, the latter is Vaadin. Connecting Java libraries isn’t rocket science, but I hope a complete example app helps you to get started faster on your domain problems.
TomEE has a small and clean archetype for JPA backed web apps. It implements a simple book inventory app, but the default UI is built with JSF and is rather harsh. So I decided to replace the JSF part of it with my favourite UI technology. In addition to working more efficiently in plain Java and forgetting about all web development details like request and response, you’ll also get a more usable and better looking app out of the box.
Instead of just reading and adding book entities in the app stub, I also completed the exercise to be a more usable full CRUD example with a floating editor window for book entities. If you try with both Faces and Vaadin, I know which one you’d rather be using ;-)
You can of course get started with plain Vaadin as well, but the example also uses Vaadin CDI helper to connect to existing services and my generic Vaadin toolbox to remove some boilerplate code. Both also come with the business friendly Apache 2 license. So in case you are not interested in changing your app server at this point, you might still want to check out the example to learn how one can de-couple stuff in UI code using CDI events or to create a confirmation dialog for your destructive action with a one-liner.
Check out the tutorial-like simple steps to convert your faces app to Vaadin from the github project.
PS. There is also a larger example of replacing JSF with Vaadin in works, based on a Java EE Petstore example by Antonio Goncalves. It is almost “feature complete”, but until I can suggest to base your work on that we’ll need some serious refactoring, cleanup and security enhancements (passwords are not encrypted!). Feel free to join the effort.