[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Multiple persistence units (one JTA one RESOURCE_LOCAL)
mtedone1
do-not-reply at jboss.com
Sat Jun 30 12:19:59 EDT 2007
| <?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="jemos-ejb3-test" transaction-type="JTA">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/JemosTestDS</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="update"/>
| <property name="hibernate.show_sql" value="true" />
| </properties>
| </persistence-unit>
|
|
| <persistence-unit name="jemos-ejb3-test-junit" transaction-type="RESOURCE_LOCAL">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <class>uk.co.jemos.ejb3.entities.Employee</class>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="update"/>
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
| <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
| <property name="hibernate.connection.username" value="user"/>
| <property name="hibernate.connection.password" value="password"/>
| <property name="hibernate.connection.url" value="jdbc:mysql://localhost/test"/>
| </properties>
| </persistence-unit>
|
| </persistence>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059390#4059390
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059390
More information about the jboss-user
mailing list