当前位置: 代码迷 >> Java Web开发 >> 关于SSH的有关问题
  详细解决方案

关于SSH的有关问题

热度:761   发布时间:2013-02-25 21:21:42.0
关于SSH的问题
我用ssh做的一个小系统,做了几次查询动作,原先速度很快,可是后数据就出不来了?也不报错。要重启tomcat服务器才能继续查询数据库,请问这问题怎么解决?

这是我的配置文件代码:
XML code
<?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:p="http://www.springframework.org/schema/p"    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">        <property name="driverClassName" value="com.mysql.jdbc.Driver">        </property>        <property name="url" value="jdbc:mysql://localhost:3306/weibo?useUnicode=true&amp;characterEncoding=UTF-8">        </property>        <property name="username" value="root"></property>        <property name="password" value="root"></property>    </bean>    <bean id="sessionFactory"        class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">        <property name="dataSource">            <ref bean="dataSource" />        </property>        <property name="hibernateProperties">            <props>                <prop key="hibernate.dialect">                    org.hibernate.dialect.MySQLDialect                </prop>                <prop key="hibernate.show_sql">                    true                </prop>                <prop key="hibernate.format_sql">                    true                </prop>                <prop key="hbm2dll.auto">                    update                </prop>                <prop key="hibernate.c3p0.max_size">                    30                </prop>                <prop key="hibernate.c3p0.min_size">                    5                </prop>                <prop key="hibernate.c3p0.timeout">                    1800                </prop>                <prop key="hibernate.c3p0.max_statements">                    50                </prop>                                  <prop key="hibernate.c3p0.idle_test_period">                    3000                </prop>                <prop key="hibernate.c3p0.acquire_increment">                    2                </prop>                <prop key="hibernate.c3p0.validate">                    true                </prop>                        <!-- 开启2级缓存 -->                             <prop key="hibernate.cache.use_second_level_cache">true</prop>                 <prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>                     <!-- 开启2级缓存统计功能 -->                <!--                 <prop key="hibernate.generate_statistics">true</prop>                <prop key="hibernate.cache.use_structured_entries">true</prop>                 -->                <!-- 使用查询缓存 -->                <!-- <prop key="hibernate.cache.use_query_cache">true</prop> -->            </props>        </property>        <property name="mappingResources">            <list>                    <value>com/weibo/model/User.hbm.xml</value>                <value>com/weibo/model/Group.hbm.xml</value>                <value>com/weibo/model/Weibo.hbm.xml</value>                <value>com/weibo/model/Topic.hbm.xml</value>                <value>com/weibo/model/Transmit.hbm.xml</value>                <value>com/weibo/model/Label.hbm.xml</value>                <value>com/weibo/model/Activity_Category.hbm.xml</value>                <value>com/weibo/model/Group_Category.hbm.xml</value>                <value>com/weibo/model/Activity.hbm.xml</value>                <value>com/weibo/model/Message.hbm.xml</value>                <value>com/weibo/model/Activity_Message.hbm.xml</value>                <value>com/weibo/model/User_Group.hbm.xml</value>                <value>com/weibo/model/User_Activity.hbm.xml</value>                <value>com/weibo/model/Activity_Comment.hbm.xml</value>                <value>com/weibo/model/Admin.hbm.xml</value>                <value>com/weibo/model/Propaganda.hbm.xml</value>                <value>com/weibo/model/Love_Weibo.hbm.xml</value>                <value>com/weibo/model/Weibo_Comment.hbm.xml</value>                <value>com/weibo/model/Listen.hbm.xml</value>                <value>com/weibo/model/Comment_Message.hbm.xml</value>                <value>com/weibo/model/User_Label.hbm.xml</value>                <value>com/weibo/model/Weibo_Label.hbm.xml</value>            </list>        </property>    </bean></beans>
  相关解决方案
本站暂不开放注册!
内测阶段只得通过邀请码进行注册!
 
  • 最近登录:Fri Jul 20 13:00:20 CST 2018
  • 最近登录:Fri Jul 20 13:00:20 CST 2018
  • 最近登录:Fri Jul 20 13:00:20 CST 2018
  • 最近登录:Fri Jul 20 13:00:20 CST 2018
  • 最近登录:Fri Jul 20 13:00:20 CST 2018