0 Replies Latest reply on Apr 12, 2013 7:28 AM by vpolakis

    Har to JPA question

    vpolakis

      Hi all,

       

      i want to convert a har to plain JPA.

      I have seen the

      https://community.jboss.org/message/621533

      and

      https://community.jboss.org/thread/200835

       

      but I have a niewbie question.

      My hibernate-service.xml is

       

      <server>

          <mbean code="org.jboss.hibernate.jmx.Hibernate"

      name="jboss.har:service=Hibernate">

              <attribute name="DatasourceName">java:/DefaultDS</attribute>

              <attribute name="Dialect">org.hibernate.dialect.HSQLDialect</attribute>

              <attribute name="SessionFactoryName">TMFSessionFactory</attribute>

              <attribute name="CacheProviderClass">

      org.hibernate.cache.HashtableCacheProvider

      </attribute>

             <attribute name="Hbm2ddlAuto">update</attribute>

          </mbean>

      </server>

       

      So I guess I have to replace the hibernate-service.xml to persistence.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">

      <persistence-unit name="mypu">

      <description>JPA application</description>

      <jta-data-source>java:/DefaultDS</jta-data-source>

      <properties>

      <property name="hibernate.hbm2ddl.auto" value="update"/>

      <property name="jboss.entity.manager.factory.jndi.name" value="TMFSessionFactory"/>

      <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>

      </properties>

       

      </persistence-unit>

      </persistence>

       

      Is the jboss.entity.manager.factory.jndi.name" value="TMFSessionFactory"/>

      Correct or??