会话位于何处?在客户端浏览器还是在服务器端?以及为什么在休眠中使用它? [英] Where is the session located ? in client browser or at the server side ? and why it is used in hibernate?

查看:150
本文介绍了会话位于何处?在客户端浏览器还是在服务器端?以及为什么在休眠中使用它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道该会话用于Hibernate中的数据库,但是该会话在数据库中的任务是什么?

I know that the session is used for the database in Hibernate, but what is the task of the session in database?

有人知道吗?

推荐答案

更新: 抱歉,我的链接是指向Java API的(必须错过了nhibernate标签).不管怎样,.NET也将有不止一种类型的会话.

Update: Apologies, my links are to Java APIs (must have missed the nhibernate tag). Regardless, there will be more than one type of session for .NET also.

通常会有不止一种类型的会话:

There will typically be more than one type of session:

  • The HttpSession is a server-side object:

提供一种识别用户的方法 跨越一个以上的页面请求或 访问网站并存储 有关该用户的信息.

Provides a way to identify a user across more than one page request or visit to a Web site and to store information about that user.

  • 休眠会话也是服务器侧对象:
    • The hibernate Session is also a server-side object:
    • 会话的生命周期是有限的 通过逻辑的开始和结束 交易. (长时间交易可能 跨几个数据库事务.)

      The lifecycle of a Session is bounded by the beginning and end of a logical transaction. (Long transactions might span several database transactions.)

      会话的主要功能是 提供创建,读取和删除 映射实例的操作 实体类.

      The main function of the Session is to offer create, read and delete operations for instances of mapped entity classes.

      这篇关于会话位于何处?在客户端浏览器还是在服务器端?以及为什么在休眠中使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆