最近用hibernate作持久层(mysql),做了一个小网站,用tomcat+apache融合起来运行(redhat9.0)。
出现了三个问题,想请教各位高手如何解决?
1)
hibernate隔夜问题:发现当天运行得很好,但第二天早上一来,就出现了问题。网页里的数据不能显示出来,只有当再次发贴时,才显示出来。
2)第二个问题是:有时发一个贴时,点击浏览时,要好久(1-2分钟)才能浏览,但不是当天发的贴,瞬间就可以查看,不知道是什么回事?
3)第三个问题是:点击更新时,不同步数据库,用了flush但更新后,还是出现原来的数据?不知道如何解决?
谢谢!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.voff.News" table="news">
<id name="nid">
<generator class="increment"/>
</id>
<property name="ncontent" />
<property name="hits" />
<property name="nauthor"/>
<property name="ntitle"/>
<property name="time"/>
<property name="iftop"/>
<property name="ifshow"/>
<property name="cateid"/>
<property name="lastupdate"/>
</class>
</hibernate-mapping>
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<!-- Generated by MyEclipse Hibernate Tools. -->
<hibernate-configuration>
<session-factory>
<property name="connection.username">root</property>
<property name="connection.password"></property>
<property name="connection.url">
jdbc:mysql://localhost/news?useUnicode=true&characterEncoding=UTF-8
</property>
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="myeclipse.connection.profile">Mysql</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<property name="c3p0.min_size">5</property>
<property name="c3p0.max_size">30</property>
<property name="c3p0.time_out">1800</property>
<property name="c3p0.max_statement">50</property>
<property name="connection.pool_size">1</property>
<mapping resource="com/voff/News.hbm.xml" />
<mapping resource="com/voff/User.hbm.xml" />
<mapping resource="com/voff/Comment.hbm.xml" />
<mapping resource="com/voff/Category.hbm.xml" />
<mapping resource="com/voff/Pk.hbm.xml" />
<mapping resource="com/voff/Qa.hbm.xml" />
<mapping resource="com/voff/Logs.hbm.xml" />
</session-factory>
</hibernate-configuration>
我的hibernate配置,google了一下,但还是没有解决问题。继续求助!
分享到:
- 2007-03-20 09:07
- 浏览 2095
- 评论(1)
- 论坛回复 / 浏览 (1 / 2531)
- 查看更多
相关推荐
关于Hibernate3中文查询出错问题的解决,相信有不少朋友也遇过这种问题,希望对大家有所帮助
hibernate_问题详解hibernate_问题详解hibernate_问题详解hibernate_问题详解hibernate_问题详解hibernate_问题详解hibernate_问题详解
Hibernate面试题专栏 - 最全的Hibernate面试题, Hibernate笔试题, Hibernate问题 Hibernate教程
spring+hibernate包冲突问题 spring+hibernate包冲突问题
关于Hibernate级联删除的问题.doc
hibernate 资料hibernate 资料hibernate 资料hibernate 资料
hibernate常见问题及处理。
关于 Hibernate 的学习总结ppt 内包含了 inverse 的看法与eclipse安装 Hibernate 插件
hibernate3hibernate3hibernate3hibernate3hibernate3hibernate3hibernate3hibernate3
关于hibernate 的createQuery和createSqlQuery 的区别
帮助大家在配置hibernate方面提供支持
hibernate教程hibernate教程hibernate教程
hibernate annotation hibernate3
hibernate5 hibernate PDF 讲义 动力 hibernate ssh hibernate5 节点
Hibernate.jar包,Hibernate可以应用在任何使用JDBC的场合,包含 hibernate-commons-annotations-4.0.1.Final.jar hibernate-core-4.1.12.Final.jar hibernate-ehcache-4.1.12.Final.jar hibernate-entitymanager-...
jsp中关于Hibernate延时加载的问题,实例源代码,详解都有
hibernate3+stst+mysql开发的用户管理系统
hibernate 5.2.15 hibernate 5.2.15 hibernate 5.2.15 hibernate 5.2.15 hibernate 5.2.15hibernate 5.2.15
博文链接:https://yourenyouyu2008.iteye.com/blog/227988
Dwr+Hibernate的Lazy问题 解决了Hibernate延迟加载失效问题