Adam Bien's Weblog
Tomcat On Steroids (with EJB 3) = Apache TomTom
Apache TomTom is an opensource, easy to install EJB 3.1 container. It is lacking CDI, so it is not a full Java EE 6 WebProfile server.
The test:
- Download size (tomtom-6.0.29.313.zip ): 28 MB
- Installation = Unzip
- Disc size: 36,9 MB after installation
- Startup: same as tomcat: ./startup.sh
- Deployment: copy of the LeanestInterceptor.war into tomtom-6.0.29.313/webapps. App is available under: http://localhost:8080/LeanestInterceptor/
- Full deployment of LeanestInterceptor took ~6 secs.
- Tested was: Servlet with injected and intercepted EJB 3
- TomTom is Apache Tomcat 6.0.29 bundled with Apache OpenEJB 3.1.3 (known for the extremely fast start-up times),Apache ActiveMQ 5.3.1, Apache CXF 2.2.10, Apache OpenJPA 1.2.1, and Apache Geronimo Connector & Transaction 2.1
The overall impression - good. There was no problem deploying the application. openEJB, however, tried to deploy the .DS_Store file as a WAR - but it couldn't :-):
/Users/abien/work/servers/tomtom-apache-tomcat-6-1.0.29/webapps/.DS_Store: Unknown module type.
I had to extend the example with a @Local interface - and introduced so some bloat :-). Injection of @LocalBean into a servlet didn't worked. Still amazing: the same EJB sample works on Glassfish V3 and ...Tomcat. Download TomTom!, see also Release Notes.
Posted at 10:11AM Nov 02, 2010 by Adam Bien in Real World Java EE Patterns - Rethinking Best Practices | Comments[9] | Views/Hits: 9241
*NEW* Workshop: "Effective Java EE 6/7", July 10th, Airport Munich Tweet Follow @AdamBien



It is better including apache openwebbeans, which the implementation of CDI from Apache, thus a full web stack from Apahce software.
Posted by hantsy on November 02, 2010 at 01:46 PM CET #
@Hantsy,
absolutely! This would be great,
happy hacking!,
adam
Posted by adam-bien.com on November 02, 2010 at 01:55 PM CET #
I guess I don't really see the relevance. Why not just run GF3? What's the point of tomtom? Sorry. I guess I missed it. It seems like another option, sure. But...why?
Posted by jkilgrow on November 02, 2010 at 03:40 PM CET #
@jkilgrow,
one reason is politics and strange organizational issues. In some companies only Tomcat can be used in production. With TomTom they even can run lightweight applications on it and remain compliant:-).
You are right - Glassfish is a very good choice,
adam
Posted by adam-bien.com on November 02, 2010 at 04:13 PM CET #
"In some companies only Tomcat can be used in production." I think in those companies (maybe mine is a typical one) you're not allowed to use any tomcat-based application server, there's an existing tomcat on the server and all you can do is deploying your war file there. There's no chance for Apache Tom Tom (sounding like my gps :-) ) in those companies.
In conclusion, still no point of Apache Tom Tom.
Posted by Thai Dang Vu on November 02, 2010 at 08:26 PM CET #
@Thai,
in that case you could deploy plain openEJB inside tomcat. You would get a custom TomTom then :-)
Posted by adam-bien.com on November 02, 2010 at 10:19 PM CET #
@hantsy
There is another Tomcat based Java EE 6 Web Profile container which supports CDI. The project name is siwpas (http://code.google.com/p/siwpas). It integrates Tomcat, OpenEJB 3.2-SNAPSHOT, OpenWebBeans and other Apache implementations. There is also company which offer professional support.
@jkilgrow
Tomcat with OpenEJB is very light. I'm using it in a few projects and it works very well and FAST.
Posted by Łukasz on November 03, 2010 at 09:56 AM CET #
TomTom looks interesting for people wanting to migrate from Tomcat+Spring to JEE6 stack.
Does it support clustering (Servlet, JPA, MQ)?
What about product name stealing (www.tomtom.com) ?
Posted by gerald on November 03, 2010 at 05:02 PM CET #
@jkilgrow, @Thai In all fairness the integration goes back several years (before Geronimo and GlassFish) but has never been a complete Java EE implementation. Finally with the Web Profile we can describe it in a way that is easy to understand, officially acknowledged by the Java EE spec and can be certified.
Posted by David Blevins on November 05, 2010 at 06:41 PM CET #