look here for a tutorial on ejb3
http://caveatemptor.hibernate.org/2.html
place the "persistence.xml" file in the meta-inf directory of the par-archive. a persistence.xml looks like the following:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<entity-manager>
<name>A Name</name>
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.ejb.cfgfile" value="hibernate.cfg.xml"/>
<property name="hibernate.connection.username">xxx</property>
<property name="hibernate.connection.password">xxx</property>
<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
<property name="hibernate.connection.url">your jdbc connection url</property>
<property name="hibernate.connection.driver_class">the driver class</property>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/> -->
<property name="hibernate.cglib.use_reflection_optimizer">false</property>
</properties>
</entity-manager>
more infos on the new par-archive:
http://www.hibernate.org/hib_docs/entitymanager/reference/en/html/configuration.html