HIbernate配置JTA的platform

abguorui0 2014-02-20

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.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_2_0.xsd">
        
   <persistence-unit name="fyszy" transaction-type="JTA">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>jdbc/database</jta-data-source>
      
      <class>com.*.User</class>
      
      <properties>
	  	<property name="hibernate.hbm2ddl.auto" value="false" />
	  	<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
	  	<property name="hibernate.show_sql" value="true" />
		<property name="jta.UserTransaction" value="javax.transaction.UserTransaction"/>

property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.WeblogicJtaPlatform"/>
	  </properties> 
   </persistence-unit>
</persistence>

相关推荐