Java EE 5 and 6 compatibility for OmniFaces 1.x

arjantijms edited this page Oct 21, 2014 · 1 revision

Introduction

OmniFaces 1.x states that it is Servlet 2.5 (Java EE 5) compatible, yet the project seems to have a dependency on the Java EE 6 API. What's happening here?

Short explanation

Java EE 6 dependency is for optional stuff. The core functionality of OmniFaces 1.x should work on Servlet 2.5, but it's not always thoroughly tested.

Details

This is indeed an ongoing debate and a source of some confusion. Normally in our work we're rather forward thinking, e.g. we adopted Java EE 6 in 2010 and Java SE 7 in 2011.

Java EE 5 itself is from mid 2006 and is at the time of writing thus over 6 years old. JSF 2 itself is also part of Java EE 6, although it indeed is backwards compatible with Java EE 5/Servlet 2.5.

The compromise that we took is basically the same as JSF 2 does: optionally take advantage of Java EE 6 functionality, but stay compatible with Java EE 5. That's why the Java EE 6 dependency is there; it's a compile time dependency so that the optional stuff compiles. In our documentation we provide workarounds for Servlet 2.5 users where needed.

OmniFaces 2.x dropped Servlet 2.5 compatibility and depends on Servlet 3.0, CDI 1.0 and JSF 2.2. OmniFaces 1.x is maintained and from 1.10 on wards does not depend on- nor takes advantage of CDI anymore.

Additionally, our daily development work is done on Java EE 7 implementations. We don't have a testing farm setup yet (definitely working on it, but not done yet), so we only rarely test on Java EE 5/Servlet 2.5 and thus it may well happen that something accidentally slips through.