Rick has posted 25 posts at DZone. You can read more from them at their website. View Full User Profile

Seam 2.0.1 released, Is Seam or Spring the best way to write JSF/JPA based applications?

  • submit to reddit

Seam 2.0.1 is out and ready for download. Seam is a framework that supports web applications that are built with EJB3 and JSF--JEE5 centric.  Seam 2.0.1 provides cleaner RESTful URLs which "means that you don't have to do any extra work to consume or generate cleaner URLs" (Seam blog).  This is the first GA release of Seam in over six months.

Seam 2.0.1 works with the latest version of JBoss Tools (merged JBoss IDE and Exadel Studio), which provides support for building Seam applications, visual page editor, JSF support, Facelets support, JBoss AS support, and more.

The new release provides documentation for using Seam with WebSphere, OC4J, WebLogic, Tomcat, etc., and now runs with the latest version of JBoss 5.

The Seam generation tools now generates Seam apps based on an existing database or JPA annotated classes. 

What is Seam?

"EJB 3.0 has changed the notion of EJB components as coarse-grained, heavy-weight objects to EJBs as lightweight POJOs with fine-grained annotations. In Seam, any class may be an EJB - Seam eliminates the distinction between presentation tier components and business logic components and brings a uniform component model to the EE platform...But Seam is not limited to environments that support EJB 3.0. Seam may be used in any J2EE environment, or even in plain Tomcat. " from Seam site.

Seam integrates with Spring as an option. Seam provides different contexts (somewhat like scopes in Spring) for components (like JSF managed beans), namely, Stateless, Event, Page, Conversation, Session, Business Process and Application context that provide many more options than the traditional scopes in JSF.

Seam provides many enhancements to the JSF programming model for validation, JSF components, RESTful URLs, Ajax remoting, providing security support, and a lot more.

Seam integrates with Quartz, GWT, Hibernate Search, iText PDF, JBossCache, jBPM, RichFaces, IceFaces, Groovy, JEE, JMS, WebServices, Java mail (with markup to generate mail, sending and receiving mail), and much more.

Seam seems to be well documented and there are several books published on Seam.

Seam 1.0 beta was released on 9/19/2005. The first versions seemed to be an alternative to Spring with a strong emphasis on JEE, JSF and EJB3. Later versions seemed to support more application servers and integration with Spring.

Seam integration: Spring and Seam running through the meadow, holding hands

It appears that Seam integrates well with Spring. You can inject Seam components into Spring beans, inject Spring beans into Seam components, and use a a Spring bean as a Seam component. In addition Seam provides Spring scopes for all of the Seam contexts, you can use Spring transaction support, and much more.

Questions for Seam users:

  • Are you using Seam now, if so what do you think?
  • How is the Seam learning curve? 
  • What is your experience working with Seam?
  • What features of Seam can you not live without?
  • How good is the Seam generation tools?
  • Is Seam the best way to write a JPA, JSF based application?

Questions for Seam versus Spring:

  • How would you position Seam and Spring? competitors or complementary? overlap or augmentation?
  • If you are using Seam and Spring, and you had to live without one of them, which one would it be?
  • Do you use Seam with or without EJB3?
  • Do you use Seam with or without Spring?
  • Where do you think Spring and Seam overlap and when they do overlap which one is better?
  • Do you think Spring JSF support is weak or strong?

Getting started with Seam 

IBM developerWorks has an excellent series of articles introducing Seam features, namely, An application framework tailor-made for JSF, Conversations with Seam, and Ajax for JSF.

  1. Seam blog announcing new version of Seam
  2. Seam site

About the author

Rick Hightower is CTO of Mammatus and is an expert on Java and Cloud Computing. Rick is invovled in Java CDI advocacy and Java EE. CDI Implementations - Resin Candi - Seam Weld - Apache OpenWebBeans

Published at DZone with permission of its author, Rick Hightower.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Rick Hightower replied on Fri, 2008/02/15 - 2:39pm in response to: Rainer Eschen

Good to hear. Seems like seam offers a lot. We don't use it yet, but it is integrated with Crank.


rick hightowercto of arcMindbloglinkedin

Dan Allen replied on Mon, 2008/03/17 - 8:29am in response to: Rick Hightower


Great to meet you as well. I have followed your work for quite some time and I must say that I have learned a lot from you over the years. Your support for JSF has been steadfast.

The other books on Seam cover 1.2.1, which is quite different than the 2.x series. I wouldn't go so far to say that the changes are at the level of Tapestry's rewrites, but enough to warrant new material. Additionally, in the words of many of the reviewers, Seam in Action is more in depth than anything else out there...perhaps even too much so at times. However, advanced JSF and Seam users will *not* be disappointed. I focus pretty heavily on the ORM problems in web applications and how Seam fixes them. I also cover a lot of fun stuff that didn't make it in the other books like RichFaces/Ajax4jsf, Seam remoting, PDF generation, charting, Spring integration, and rule-based security. There is plenty to learn for all.

Most importantly, I wrote Seam in Action to help people like me grok Seam. My feeling is that a lot of the articles on Seam, and even the reference documentation, glance over some of the most key concepts, taking for granted how they work. They don't escape explaination in my book.

HARVINDER SALUJA replied on Tue, 2010/04/20 - 10:25am in response to: Rick Hightower

David... I am interested in purchasing licences for the SEAM 2.0/2.1 courseware. Can you please provide me with cost structure.



Carla Brian replied on Thu, 2012/06/07 - 11:42am

I haven't used this yet. I think they are efficient.  I want to download this one. - Garrett Hoelscher

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.