File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes Seam without Hibernate, possible? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Seam without Hibernate, possible?" Watch "Seam without Hibernate, possible?" New topic

Seam without Hibernate, possible?

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441


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?

[My Blog] [JavaRanch Journal]
Dan Allen
Ranch Hand

Joined: Mar 05, 2003
Posts: 164
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.

Dan Allen | | Author of Seam in Action -
I agree. Here's the link:
subject: Seam without Hibernate, possible?
jQuery in Action, 3rd edition