• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Seam without Hibernate, possible?

Posts: 10445
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic