Why we need a real Web Profile

Posted by    |       CDI Java EE

Recently the EE6 co-lead, Roberto Chinnici, blogged about the state of profiles in EE6, and requested feedback on which direction the group should take. This was also posted to InfoQ and TSS. Essentially we have a choice between two options:

  1. Rubberstamp Tomcat
  2. Provide a complete framework for web development.

The first option offers nothing new that doesn't already exist today. Right now you can download Tomcat and, unless you are still developing with just Servlets and JSPs, install the many different frameworks you need to build a modern web application. You are then left to discover the magic version combination that doesn't have dependency conflicts or integration issues.

What we really need is a standardized solution which addresses the three most common needs of modern web applications:

  • A data persistence framework
  • A component framework
  • A rich presentation framework

The full Java EE platform has good solutions for all of these aspects today, and more work is being done to improve them (e.g Web Beans, ability to deploy EJBs in a war, etc). However, the full EE platform also contains many other standards, most of which are focused towards EIS (like CORBA, RMI, JMS, JCA, etc). EIS is, of course, not necessary for a significant portion of web applications. So, the central idea behind option 2, is to deliver a version of the platform that is truly focused towards web development.

Not only can we omit specifications that don't serve the above goals, we can also improve the ones that do to better meet our new-found focus. A good example of this, is EJB-Lite, which only requires support for local session components and JPA.

Taking all of this into account we end up with what I view is the ideal combination, which I have strongly advocated on the EG:


Data Persistence

  • JPA 2.0
  • JTA 1.1

Component Framework

  • EJB Lite 3.1
  • Web Beans 1.0

Rich Presentation

  • JSF 2.0
  • Servlet 3.0 (and friends, jsp, el, jstl etc)

I should also mention that non-standard frameworks would of course still be usable on this profile. As an example, Web Beans will offer an SPI so that any web framework can take advantage of the improved/simplified component integration layer, should it choose to.

However, I think the goal should be to provide a good out-of-the-box solution for web development, and a tomcat profile definitely falls short.


Back to top