JBoss Community

Data Source Configuration in AS 7

new comment by Armen Arzumanyan View all comments on this document

Hi Alli, how can we call datasource from percictance-unit??

If my DS name is newsportal under glassfish I just write newsportl in the p.unit.

<persistence-unit name="jmagazinePU" transaction-type="JTA">

    <provider>org.hibernate.ejb.HibernatePersistence</provider>

    <jta-data-source>newsportal</jta-data-source>

    <exclude-unlisted-classes>false</exclude-unlisted-classes>

     <properties>

      <property name="hibernate.connection.useUnicode" value="true"/>

      <property name="hibernate.connection.characterEncoding" value="UTF-8"/>

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

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

    </properties>

  </persistence-unit>

 

Also Where we can copy-paste mysql jdbc driver? Stiil I can not configure DS under JBoss7 and use it with p.unit.

 

Thanks