67,549
社区成员




<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<context:annotation-config />
<!-- *** FOLLOWING CONFIGURATION IS BASIC LINE,DON NOT CHANGE ***-->
<!-- BeanPostProcessor that processes PersistenceUnit and PersistenceContext annotations -->
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
<property name="persistenceUnitName" value="dzInter" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="true"></property>
<property name="database" value="INFORMIX"></property>
<property name="generateDdl" value="true"></property>
<property name="databasePlatform" value="org.hibernate.dialect.InformixDialect"></property>
</bean>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory"
ref="entityManagerFactory" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager" /></beans>
<?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="dzInter" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name = "hibernate.connection.driver_class" value = "com.informix.jdbc.IfxDriver"/>
<property name = "hibernate.connection.url" value = "jdbc:informix-sqli://192.168.254.89:8192/dzppt_srv:INFORMIXSERVER=diccyw_web"/>
<property name = "hibernate.connection.username" value = "webdba"/>
<property name = "hibernate.connection.password" value = "ywawebdba"/>
<!--连接池中保留的最小连接数-->
<property name="minPoolSize" value="1" />
<!--连接池中保留的最大连接数 Default: 15 -->
<property name="maxPoolSize" value="20" />
<!--初始化时获取的连接数,取值应在minPoolSize与maxPoolSize之间 Default: 3 -->
<property name="initialPoolSize" value="2" />
<!--最大空闲时间,60秒内未使用则连接被丢弃。若为0则永不丢弃 Default: 0 -->
<property name="maxIdleTime" value="1800" />
<!--当连接池中的连接耗尽的时候c3p0一次同时获取的连接数 Default: 3 -->
<property name="acquireIncrement" value="30" />
</properties>
</persistence-unit>
</persistence>