Last weekend while pondering the question "Is Scala ready for the enterprise?" I decided to write a simple Java EE 6 app entirely in Scala, without using any Java. I had three main reasons for doing this: one was just to see how easy/difficult it would be to write everything in Scala (it was easy). Another was to document the process for others journeying down the same road (the entire project is on github). Finally, I wanted to identify advantages of using Scala instead of Java that are specific to Java EE apps (I found several).
Background
The specific app I created was an adaptation of the Books example from Chapter 10 of Beginning Java™ EE 6 Platform with GlassFish™ 3. It's a simple web app that displays a list of books in a database and lets you add new books. Although it's a pretty trivial app, it does touch on several important Java EE 6 technologies: JPA 2.0, EJB 3.1 and JSF 2.0.
"Enunciate is an engine for dramatically enhancing your Java Web service API.
It's simple. You develop your Web service API using standard Java technologies and attach Enunciate to your build process. Suddenly, your Web service API is boasting some pretty impressive features:
Full HTML documentation of your services, scraped from your JavaDocs.
Client-side libraries (e.g. Java, .NET, iPhone, Ruby, Flex, AJAX, GWT, etc.) for developers who want to interface with your API.
Interface Definition Documents (e.g. WSDL, XML-Schema, etc.)
Etc."