日期:2014-05-17 浏览次数:20874 次
<!-- HIBERNATE 延迟加载 -->
<filter>
<filter-name>hibernateFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- SPRING 加载 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml;</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<property name="hibernate.dialect">org.hibernate.dialect.FirebirdDialect</property>
<property name="connection.driver_class">org.firebirdsql.jdbc.FBDriver</property>
<property name="connection.url">jdbc:firebirdsql:10.106.115.2/3050:pim</property>
<property name="connection.username">SYSDBA</property>
<property name="connection.password">masterkey</property>
<!-- 配置连接池 -->
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.idle_test_period">100</property> <!-- seconds -->
<property name="hibernate.c3p0.max_size">10</property>
<property name="hibernate.c3p0.max_statements">50</property>
<property name="hibernate.c3p0.min_size">3</property>
<property name="hibernate.c3p0.timeout">300</property> <!-- milliseconds -->
<property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<!-- 其他 -->
<property name="show_sql">true</property>
<property name="format_sql">true</property>
<property name="current_session_context_class">thread</property>
<!-- 二级缓 -->
<property name="hibernate.cache.use_second_level_cache">true</property>
<property name="hibernate.cache.use_query_cache">true</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
<property name="hibernate.generate_statistics">true</property>
推荐阅读更多>
-
【】考勤系统
-
线程有关问题,新人小白,帮同学问的
-
蛮奇怪的有关问题
-
qGrid报表行编辑,编辑行下有一个可以选择行的表格,选择的数据可以填充到编辑行中,如图:求帮助
-
三大框架整合使用juint测试DAO出现的有关问题
-
怎么将整型转化为字节型
-
有没有公司要见习生!北京
-
hibernate 查询出的list不能转换成持久化类解决思路
-
对于使用java备份mysql数据库,为何备份后,文件是空的
-
请教怎么设置eclipse是其使用sun的Java编译器,而不是它自己的,多谢
-
为什么小弟我电脑的IP地址总是在变?通常是127.0.0.1…是物理地址?还是…
-
LazyInitializationException: could not initialize proxy - the owning Session was closed
-
Spring 构造方式注入枚举类型 如何写
-
Spring MVC 跳转有关问题
-
关于java剔除手机黑名单的算法,有没有更好的?该怎么解决
-
id to load is required for loading解决方法
-
javaWeb本地运行好的,下传到空间,报了500异常
-
com.microsoft.sqlserver.jdbc.SQLServerException: 将截断字符串或二进制数据。该怎么解决
-
nested exception is org.springframework.beans.NotWritablePropertyException:
-
EntityManager类中的merge方法如何用