Home Hibernate Hibernate4 Seam Hibernate



Seam Hibernate
Posted on: May 19, 2012 at 12:00 AM
In this section, you will learn about seam framework with hibernate.

Seam Hibernate

In this section, you will learn about seam framework with hibernate.

Seam, a web application framework developed by JBoss, is a very effective framework for constructing rich Internet applications in Java. Seam comprises technologies such as AJAX, JSF, JPA, and Business Process Management.

Seam with Hibernate

You can incorporate either JPA (EntityManager) or Hibernate. It works without EJB. If required, you can use plain POJO.

You can use Hibernate setting in SEAM component  using WEB-INF/components.xml.

SessionFactory setting


<persistence:hibernate-session-factory name="sessionFactory" cfg-resource-name="application.cfg.xml"/>

Where application.cfg.xml is placed in the classpath root.

Session settings


<persistence:managed-hibernate-session name="session" hibernate-session-factory="#{sessionFactory}" auto-create="true"/>

TransactionManagement settings


<tx:hibernate-transaction session="#{session}"/>

You can inject your hibernate session as follows :


private @In Session session;

Regardless of the fact that seams uses Java Server Faces by default , seam can function with any any MVC framework.

Click Here to get the complete documentation of Seam Framework including Seam tutorial.

Related Tags for Seam Hibernate:


More Tutorials from this section

Ask Questions?    Discuss: Seam Hibernate  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.