`
abeetle
  • 浏览: 99457 次
  • 来自: ...
社区版块
存档分类
最新评论

session is close的问题

阅读更多

在hibernate开发DAO模块,如果使用session不可避免会出现 session is close的问题。

而且我是用myecplse自动编的DAO。如果不加特别处理的话,session不能有子session存在

要不然就总会显示session is closed

解决办法目前就知道有2个,一个是自己做个DAO工厂,一个是用filter功能

这两个办法,网上都有介绍,不过对于自动生成的DAO相关的文件,改变比较大,很有可能得重写。

本人比较懒,还是想找点简单点的,不过还未成功,继续研究中。。。。

分享到:
评论

相关推荐

    处理session跨域几种方案

    // is a session with this id in the database? $res = @mysql_query("SELECT * FROM ".self::db_table." WHERE session_id = '$sessID'", $this->db_handle); // if yes, if(@mysql_num_rows($res)) { ...

    php提示Failed to write session data错误的解决方法

    提示信息:Warning: Failed to write session data (files).Please verify that the current setting of session.save_path is correct () in Unknown on line 0 二、解决方法: 代码如下:复制代码 代码如下:session...

    实现在同一方法中获取当前方法中新赋值的session值解决方法

    项目开发中遇到这样一个问题,在同一方法中对session数组进行赋值,但是想在此方法中接着使用此session,因为我是用的if…elseif…,由于排斥作用,在if条件中给session赋值后,再调用方法进入另一个elseif条件中就...

    解析PHP的Yii框架中cookie和session功能的相关操作

    Sessions 和 请求 和 响应类似, 默认可...if ($session->isActive) ... // 开启session $session->open(); // 关闭session $session->close(); // 销毁session中所有已注册的数据 $session->destroy(); 多次调用yi

    J2EE利用Hibernate采用B/S架构网页设计

    public static void closeSession() throws HibernateException { Session session = (Session) threadLocal.get(); threadLocal.set(null); if (session != null) { session.close(); } } /** * return ...

    PHP使用Redis替代文件存储Session的方法

    本文实例讲述了PHP使用Redis替代文件存储Session的方法。分享给大家供大家参考,具体如下: PHP默认使用文件存储session...bool session_set_save_hanler(callback open,callback close,callback read,callback write,c

    Java邮件开发Fundamentals of the JavaMail API

    be an open relay, as authentication is supported, but it is your responsibility to ensure the SMTP server is configured properly. There is nothing in the JavaMail API for tasks like configuring a ...

    如何使用Redis保存用户会话Session详解

    前言 ...如果并发量大,读写效率非常低。而Redis对高并发的支持非常好,所以,可以使用redis替代文件存储session。...bool session_set_save_hanler(callback open,callback close,callback read,callba

    FTP服务器 C#

    user.commandSession.Close(); return; } else { switch (user.loginOK) { // 等待用户输入用户名: case 0: CommandUser(user, command, param); break; // 等待用户输入密码 case 1: ...

    php.ini-development

    directive because it is not set or is mistyped, a default value will be used. ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one ; of the INI constants (On, Off, True, ...

    chromedriver_2.46.zip

    Resolved issue 2736: Close Window command should handle user prompts based on session capabilities [[Pri-2]] Resolved issue 1963: Sending keys to disabled element should throw Element Not interactable...

    chromedriver.exe

    Resolved issue 2736: Close Window command should handle user prompts based on session capabilities [[Pri-2]] Resolved issue 1963: Sending keys to disabled element should throw Element Not interactable...

    testActiveMQ.rar

    session = connection->createSession(Session::SESSION_TRANSACTED); } else { session = connection->createSession(Session::AUTO_ACKNOWLEDGE); } // Create the destination (Topic or Queue) if ...

    DotNetFtpSources

    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License,...

    吉林大学软件学院Software Analyse and Design实验报告

    To update the registration process from heavy manual process and paper works to a computerized system for efficiency, a new registration system is designed for a software development conference. ...

    pyloris-3.2-win32

    This is the number of attacker threads run during the session. -b, --connectionspeed This is the connection speed for each individual connection in bytes/second. Comparing this with the lenght of the...

    微软内部资料-SQL性能优化3

    To make use of either more or less strict isolation levels in applications, locking can be customized for an entire session by setting the isolation level of the session with the SET TRANSACTION ...

    jbpm流程控制初学者容易接触的domo

    获取session JbpmContext jc=jbpmConfiguration.createJbpmContext(); //要把流程图转换成java对象 InputStream is=new FileInputStream("D://java_dianli//jbpm//src//leave//leave.zip"); ZipInputStream z...

    plug-In PHP- 100 Power Solutions

    Close Session; Secure Session; Manage Cookie; Block User by Cookie; Create Google Chart; Curl Get Contents; Fetch Wiki Page; Fetch Flickr Stream; Get Yahoo! Answers; Search Yahoo!; Get Yahoo! Stock ...

    计算机网络第六版答案

    Many of these data centers are located in, or close to, lower tier ISPs. Therefore, when Google delivers content to a user, it often can bypass higher tier ISPs. What motivates content providers to ...

Global site tag (gtag.js) - Google Analytics