This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
From what i know, Seam started off as a framework whose objective was to bring in a state management for Hibernate web applications (to avoid all the LazyInit problems). But now from what i see, it has grown and does a lot other things for providing context/state management in applications. The Introduction to Seam page mentions that the framework supports EJB3, JPA and JSF which are part of JavaEE5. However, it still looks like the applications still have to use Hibernate and no other persistence provider (Note that i am not against Hibernate )? I mean, if my application uses TopLink (which adheres to JPA), can i still use Seam?
You absolutely can use any JPA provider other than Hibernate. I describe in chapter 1 that you have two choices in Seam. You can choose native Hibernate or you can choose JPA. If you choose JPA, you can use any ORM provider for JPA (TopLink, Kodo, OpenJPA, etc). Hibernate is the provider choice, but you can override that by configuring the built-in persistenceProvider component.
Okay, so what's the real truth? Well, there is one feature in Hibernate that no other JPA provider supports that Seam encourages you to use: Manual flushing. Manual flushing is the key to the application transaction. So, while you can use Seam with any JPA provider, you lose the flushing management that Seam provides for you. If any other JPA provider supported this feature, Seam would take advantage of it. This is explained in tremendous detail in chapter 9.