I recently started using seam framework for my new project. I thought of documenting my learning experience here, which may be of help for newbie’s to seam like me.
I used seam version 2.1.0.SP1 with Jboss-4.2.2.GA.

I preferred to use JPA and Hibernate as persistence provider , no EJB 3.0. My components.xml file looks like as follows.

Seam with just hibernate / JPA no entity beans components.xml file.

<pre name="code" class="brush:xml"><transaction:entity-transaction entity-manager=”#{entityManager}”/>
<persistence:entity-manager-factory name=”entityManagerFactory” persistence-unit-name=”seamDS”/>
<persistence:managed-persistence-context name=”entityManager” entity-manager-factory=”#{entityManagerFactory}”/>
</pre>

The entityManager can be injected as follows
@In private EntityManager entityManager;

The persistence.xml looks like as follows.
<pre name="code" class="brush:xml"><?xml version=”1.0” encoding=”UTF-8”?>
<persistence version=”1.0” xmlns=”http://java.sun.com/xml/ns/persistence” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd”>
<persistence-unit name=”seamDS” transaction-type=”RESOURCE_LOCAL”>
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>com.mani.seam.examples.model.SiteRole</class>
<class>com.mani.seam.examples.model.UserAccount</class>
<class>com.mani.seam.examples.model.UserRole</class>
<properties>
<property name=”hibernate.connection.driver_class” value=”oracle.jdbc.OracleDriver” />
<property name=”hibernate.connection.username” value=”SCOTT” />
<property name=”hibernate.connection.password” value=”TIGER” />
<property name=”hibernate.connection.url” value=”jdbc:oracle:thin:@192.168.1.102:1521:ORCL” />
<property name=”hibernate.dialect” value=”org.hibernate.dialect.Oracle10gDialect” />
<property name=”hibernate.show_sql” value=”true”/>
</properties>
</persistence-unit>
</persistence>
</pre>