日期:2014-05-17 浏览次数:21010 次
<!-- 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>
推荐阅读更多>
-
J2EE技巧:怎么让J2EE开发速度更快
-
专家让你不苦恼:Java的中文编程配置心得,该如何解决
-
java软件工程师职业规划
-
一个小弟我迷惑有关问题
-
怎么用Java获得新浪视频的评论数
-
ASP+JS处置复杂表单的生成与验证[1]
-
怎么取得int类型参数的上限
-
用Jquery插件修改密码,为什么不拦截直接执行action啊解决方案
-
对等奇怪`的报错`
-
exe格式apache-tomcat-6.0.35遇到的有关问题vist
-
stmt.executeQuery();空指针异常
-
严重: Exception starting filter struts2 java.lang.NoClassDefFoundError: org/apache解决方案
-
ajax菜鸟有关问题1
-
请教用Eclipse开发servlet和用MyEclipse开发操作上有什么不同的地方
-
刚开始学习Android,环境搭配竟然能出错了,求解决!
-
谁有common-logging.jar文件,能发个给小弟我吗
-
tomcat5.0.28运行出HTTP Status 500错误,怎么解决
-
小弟我想用j2me 读取xml的数据,可以给一些代码嘛?小弟我用的是netbean开发工具的
-
窗口之间传值遇到有关问题
-
有关String类replaceAll方法的有关问题