JPA Oracle persistence.xml

<?xml version="1.0" encoding="UTF-8" ?>
<persistence 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"
    version="1.0">
    <persistence-unit name="common" transaction-type="RESOURCE_LOCAL">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <!--  <jta-data-source>dos3DS</jta-data-source>-->
        
        
            <!-- config  JBPM4.4 -->
        
            <!-- finish config -->
        <properties>
                        <!-- 数据库方言-->
            <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
            <!-- 数据库驱动 -->
            <property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver" />
            <!-- 数据库用户名 -->
            <property name="hibernate.connection.username" value="csxxa" />
            <!-- 数据库密码 -->
            <property name="hibernate.connection.password" value="123456" />
            <!-- 数据库连接URL -->
            <property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:XE" />
            <!-- 最大抓取深度 -->
            <property name="hibernate.max_fetch_depth" value="3" />
            <!-- 验证创建数据库表结构  -->
            
           <!-- <property name="hibernate.hbm2ddl.auto" value="create" /> -->
            
            <!-- 显示SQL -->
            <property name="hibernate.show_sql" value="true" />
            <!-- 格式SQL -->
            <property name="hibernate.format_sql" value="true" />
            
            <!-- 是否使用结构化的方式缓存对象  -->
            <!-- <property name="hibernate.cache.use_structured_entries" value="true" />  -->
            
            <!-- 设置是否使用二级缓存: true or false  -->
            <property name="hibernate.cache.use_second_level_cache" value="false" />    
                        
            <!-- use query cache -->
            <property name="hibernate.cache.use_query_cache" value="false" />
            
            <!-- second level cache of EHCache -->
            <!--     
            <property name="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.EhCacheProvider" />        
            <property name="hibernate.cache.use_minimal_puts" value="true" />
            <property name="net.sf.ehcache.configurationResourceName" value="/ehcache.xml" />
             -->
            
            <!-- second level cache of MemCached -->    
            <!--
            <property name="hibernate.cache.provider_class" value="com.googlecode.hibernate.memcached.MemcachedCacheProvider" />        
            <property name="hibernate.memcached.servers" value="localhost:11211" />
            <property name="hibernate.memcached.cacheTimeSeconds" value="3600" />
            <property name="hibernate.memcached.clearSupported" value="false" />
             -->     
        </properties>
    </persistence-unit>
</persistence>  


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值