Proxool DataSource
程序员文章站
2022-05-24 08:48:15
...
<bean id="dataSource"
class="org.logicalcobwebs.proxool.ProxoolDataSource">
<property name="driver">
<value>net.sourceforge.jtds.jdbc.Driver</value>
</property>
<property name="driverUrl">
<value>jdbc:jtds:sqlserver://192.168.1.1;DatabaseName=test;charset=utf-8;autoReconnect=true</value>
</property>
<property name="user">
<value>test</value>
</property>
<property name="password">
<value>test</value>
</property>
<property name="delegateProperties">
<value>user=test,password=test</value>
</property>
<property name="maximumConnectionCount">
<value>100</value>
</property>
<property name="minimumConnectionCount">
<value>10</value>
</property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource" />
</property>
<property name="mappingLocations">
<list>
<value>
classpath*:cn/**/*.hbm.xml
</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.connection.pool_size">100</prop>
<prop key="hibernate.connection.release_mode">
auto
</prop>
<prop key="hibernate.connection.autocommit">true</prop>
<prop key="hibernate.max_fetch_depth">3</prop>
<prop key="hibernate.default_batch_fetch_size">30</prop>
<prop key="hibernate.jdbc.batch_size">100</prop>
<prop key="hibernate.jdbc.fetch_size">50</prop>
<prop key="hibernate.order_updates">true</prop>
<prop key="hibernate.jdbc.use_scrollable_resultset">
true
</prop>
<prop key="hibernate.query.substitutions">
true 1, false 0
</prop>
<prop key="hibernate.cache.use_second_level_cache">
true
</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.provider_class">
org.hibernate.cache.EhCacheProvider
</prop>
<prop key="net.sf.ehcache.configurationResourceName">
classpath:ehcache.xml
</prop>
</props>
</property>
</bean>
上一篇: test4-a
下一篇: 图的遍历算法——DFS、BFS原理及实现
推荐阅读
-
详解spring cloud config实现datasource的热部署
-
java当中JDBC当中JNDI用来查找dataSource的例子
-
java当中JDBC当中请给出一个Oracle DataSource and SingleTon例子
-
java当中JDBC当中请给出一个sql server的dataSource的helloworld例子
-
java当中JDBC当中请给出一个SQLServer DataSource and SingleTon例子
-
给出一个JNDI用来查找dataSource的例子?
-
springboot启动报错Failed to configure a DataSource: 'url' attribute is not specified
-
DataSource Mobility推RFID资产追踪软件,实现供应链可视化
-
Springboot mybatis plus druid多数据源解决方案 dynamic-datasource的使用详解
-
C# listbox DataSource数据绑定--一年半以前的bug