I am trying to use Hibernate JPA, but I need to create my persistence.xml (so that I can use entity manager correctly). I'm not sure what to create and where to place it.
This is how my hibernate.cfg.xml is configured in "Core" mode. I use: Eclipse Java EE IDE Web Developers version: Indigo Release
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.password">XXXXXX</property> <property name="hibernate.connection.url">jdbc:mysql://<hostname>/<database></property> <property name="hibernate.connection.username">XXXXX</property> <property name="hibernate.default_schema">XXXXXX</property> <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> </session-factory> </hibernate-configuration>
source share