Tuesday, May 13, 2008

Java EE 6 and EJB 3.1 look very much like Spring, Hibernate and Quartz

Java EE 6 (expected to be out late 2008 or early 2009) includes several interesting new features. EJB 3.1 specification will be released as part of JEE6 release.

Java EE 6 Features:

JEE6 will have, what it calls, Profiles offering different flavors of JEE services. Profile A is a lightweight version (Servlet, JSP etc), Profile B will include Profile A + EJB 3.1 Lite, JTA, JPA, JSF, and WebBeans, and Profile C is the "full platform" with Profile B features + JMS, JAX-WS etc.

EJB 3.1:

  • Optional Local business interfaces (where we can develop Local EJB components using only a bean class; not sure how this is different from what's in EJB 3.0)
  • EJB components in the web tier (package/deploy EJB components in a WAR w/o an ejb-jar)
  • Singleton Beans (one instance per application per JVM)
  • TimerService API

For more on EJB 3.1 features, check out this presentation by Kenneth Saks.

More and more I read about JEE6 and EJB3.1, they look very much like Spring and Hibernate. JEE expert groups finally gets it; what java developers really need from middleware framework instead of what the application server vendors want to offer. It's good to see that they are finally offering a modular server component model (so the customers can pick which Profile is the right fit to deploy their apps), Dependency Injection of objects other than EntityManager, and other features. WebLogic 10.3 and WebSphere are moving towards the same modular server architecture model approach.

I wonder what will Java EE 7 spec include, may be they will support Aspects and AOP as part of Java SE/EE specification (which Spring already does with AspectJ).

4 comments:

Maximo Burrito said...

That's funny, because most of those things have been available from app server vendors for some time. The ideas of profiles has been available in JBoss since the EJB 2 days. Not only could you mix and match the services provided by the container, you could declare any number of bean profiles AOP style to customize exactly what it meant to be an EJB. This stuff is largely not new to Java EE, it's simply being standardized after many years of use.

srinip said...

Hi Maximo, You got it. Even though these features have been available from app server vendors, only now they are becoming part of the core JEE spec. I think JCP and JEE folks are two years too late to get these into the spec. I have been using Spring and Hibernate in my projects for last few years and I am happy with it. Also, in a recent project, I used JPA (with Hibernate3 as the persistence implementation) and Spring 2.5. I really like Spring 2.5 Annotation support as well as its new Testing module.

Thanks
Srini

Dan Allen said...

I too am thrilled to see the JCP is recognizing the ideas that have emerged from open source projects like Spring and Hibernate as well as extensions implemented by vendors. Understand though, that its natural for the specification to trail the innovation. That follows the definition of these two terms. You have to innovate before you standardize. The reason the standards are worth spending time on is that they reestablish a common platform from which we are able to grow the next wave of innovation. If we never stopped to standardize, then developer's knowledge and code would fail to be portable.

Krishna said...

Java EE 6.0 New Features