spring+hibernate延迟检索得问题。 既然已经设置了opensessioninview了,应该不会出现no session or session was closed 问题了up一下 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 分析一下,有的时候filter的顺序会影响你的程序在web.xml中把opensessioninview这个filter放到所有的filter之前! 当我访问一个Lazy的属性后,session就自己关闭了,太狠了 <set name="replyTopics" cascade="save-update" inverse="true" lazy="true"> <key column="belongId"></key> <one-to-many class="Topic" /> </set> 把lazy=“true”改为false试试 怎样得到当前是否有session开启?怎样得到当前是否有事务开启? 如果配置了opensessioninview的话,只有一次请求执行完毕之后才会关闭,这是我的filter的配置 <filter> <filter-name>openSession</filter-name> <filter-class> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter </filter-class> <init-param> <param-name>singleSession</param-name> <param-value>false</param-value> </init-param> </filter> <filter-mapping> <filter-name>openSession</filter-name> <url-pattern>*.action</url-pattern> </filter-mapping> j2ee动态修改应用配置的一点疑问 过滤器问题。。求求求 对下面一段反射的代码不理解,请高手加注释,谢谢. 面试--空指针判断处理 多对多,获取数据排序问题 这条HQL怎么写 JDBC commit failed / Connection reset struts 使用struts 里的连接池做登陆页面 用过jb7的大哥们进来帮我下。好吗// JPA 接收参数不匹配 struts2 中隐藏表格列问题 java与多数据库下的事务完整性问题
太狠了
<key column="belongId"></key>
<one-to-many class="Topic" />
</set>
把lazy=“true”改为false试试
怎样得到当前是否有事务开启?
<filter>
<filter-name>openSession</filter-name>
<filter-class>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
</filter-class> <init-param>
<param-name>singleSession</param-name>
<param-value>false</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>openSession</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>