APPFUSE中使用CLOB类型
2008-01-05 18:43:21 来源:WEB开发网更改applicationContext-hibernate.xml文件为
<beans>
<!-- Hibernate sessionFactory -->
<bean id="sessionFactory" class="org.sPRingframework.orm.hibernate.LocalSessionFactoryBean">
<property name="dataSource"><ref bean="dataSource"/></property>
<property name="mappingResources">
<list>
<value>model/Role.hbm.xml</value>
......
<value>model/policy/Policycontent.hbm.xml</value>
</list>
</property>
<property name="lobHandler"><ref bean="OracleLobHandler"/></property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">net.sf.hibernate.dialect.Oracle9Dialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.jdbc.batch_size">15</prop>
</props>
</property>
</bean>
<bean id="oracleLobHandler" class="org.springframework.jdbc.support.lob.OracleLobHandler" lazy-init="true">
<property name="nativeJdbcExtractor"><ref local="nativeJdbcExtractor"/></property>
</bean>
<bean id="nativeJdbcExtractor" class="org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor">
</bean>
<!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
<bean id="transactionManager" class="org.springframework.orm.hibernate.HibernateTransactionManager">
更多精彩
赞助商链接