Skip to main content

Seam: EJB 3 and JSF, Driving the Java EE Stack

Posted by jhook on September 18, 2005 at 7:42 PM PDT

There's been some chatter online about using JSF-specific annotations to drive application coordination. But, really it's your enterprise business model (EJB 3) that should be at the wheel.

Within your business/domain objects, this is where all of your 'glue' coding happens, so lets extend EJB 3 a bit into a proper framework that starts to tie together the whole Java EE stack from the middle. Makes sense right? Welcome to Seam.

When you start talking about IoC, validation, business coordination, and persistence: you really don't want all of that expressed within the view, but you want the view to be able to leverage those concerns. 'Seam' makes JSF completely aware of those concerns while allowing you to consolidate your business model into 'one kind of stuff' within the EJB tier. The application layer separation is up to you as you can keep things as simple as you want with writing web applications.

It's worth checking out. You can probably get a better sense of it from this tutorial. Oh, and did I mention that there's really no XML? Everything stays neat and tidy with your business objects.

BTW, the public demo was written with's Facelets-- how's that for bleeding edge, open source collaboration?

In relation to my arch nemisis, Ruby on Rails, while RoR is driven from the persistence layer (which often times you don't have control over), Seam is driven by your object model to greatly simplify development for Java on the web. Lets see if we can't get something like JSF Avatar rolling too to champion the Java EE stack!