hibernate中的session同jsp中的sesssion有什么关系?有什么不同?

vcshcn 2004-11-02 12:53:13
hibernate中从sessionfactory中取得的session同jsp中的sesssion有什么关系?有什么不同?
...全文
242 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhaoyongqiang 2004-11-02
  • 打赏
  • 举报
回复
它们之间没有什么关系。它们的名字相同主要是它们的用用途是一样的,都是为了维持一个会话。不知道对不对?
jspxnet 2004-11-02
  • 打赏
  • 举报
回复
他们之间没关系,唯一的相同就是都有个 session
kui 2004-11-02
  • 打赏
  • 举报
回复
不同,hibernate中的session是org.hibernate.Session;的对象:

//$Id: Session.java,v 1.8 2004/08/09 14:35:17 steveebersole Exp $
package org.hibernate;

import java.io.Serializable;
import java.sql.Connection;
public interface Session extends Serializable {
public void flush() throws HibernateException;
public void setFlushMode(FlushMode flushMode);

/**
* Get the current flush mode.
*
* @return FlushMode
*/
public FlushMode getFlushMode();

/**
* Get the <tt>SessionFactory</tt> that created this instance.
* @see SessionFactory
*/
public SessionFactory getSessionFactory();

/**
* Get the JDBC connection. Applications are responsible for
* calling commit/rollback upon the connection before closing
* the <tt>Session</tt>.
*
* @return the JDBC connection in use by the <tt>Session</tt>
* @throws HibernateException if the <tt>Session</tt> is disconnected
*/
public Connection connection() throws HibernateException;
public Connection disconnect() throws HibernateException;

/**
* Obtain a new JDBC connection. This is used by applications which
* require long transactions.
*
* @see Session#disconnect()
* @throws HibernateException
*/
public void reconnect() throws HibernateException;
public void reconnect(Connection connection) throws HibernateException;


public Connection close() throws HibernateException;
public void cancelQuery() throws HibernateException;

/**
* Check if the <tt>Session</tt> is still open.
*
* @return boolean
*/
public boolean isOpen();

/**
* Check if the <tt>Session</tt> is currently connected.
*
* @return boolean
*/
public boolean isConnected();

/**
* Does this <tt>Session</tt> contain any changes which must be
* synchronized with the database? Would any SQL be executed if
* we flushed this session?
*
* @return boolean
*/
public boolean isDirty() throws HibernateException;
public Serializable getIdentifier(Object object) throws HibernateException;

public boolean contains(Object object);

public void evict(Object object) throws HibernateException;

/**
* Return the persistent instance of the given entity class with the given identifier,
* obtaining the specified lock mode, assuming the instance exists.
*
* @param theClass a persistent class
* @param id a valid identifier of an existing persistent instance of the class
* @param lockMode the lock level
* @return the persistent instance or proxy
* @throws HibernateException
*/
public Object load(Class theClass, Serializable id, LockMode lockMode) throws HibernateException;

/**
* Return the persistent instance of the given entity class with the given identifier,
* obtaining the specified lock mode, assuming the instance exists.
*
* @param entityName a persistent class
* @param id a valid identifier of an existing persistent instance of the class
* @param lockMode the lock level
* @return the persistent instance or proxy
* @throws HibernateException
*/
public Object load(String entityName, Serializable id, LockMode lockMode) throws HibernateException;


public Object load(Class theClass, Serializable id) throws HibernateException;


public Object load(String entityName, Serializable id) throws HibernateException;


public void load(Object object, Serializable id) throws HibernateException;


public void replicate(Object object, ReplicationMode replicationMode) throws HibernateException;
public void replicate(String entityName, Object object, ReplicationMode replicationMode) throws HibernateException;


public Serializable save(Object object) throws HibernateException;

..............



public void disableFilter(String filterName);

}
mbl 2004-11-02
  • 打赏
  • 举报
回复
不知道
shangqiao 2004-11-02
  • 打赏
  • 举报
回复
晕!那他们两个和jmail里面的Session是什么关系,和jms里面的Session有什么关系
show90 2004-11-02
  • 打赏
  • 举报
回复
它们之间没有什么关系
源码直接下载地址: https://pan.quark.cn/s/a4b39357ea24 过采样与欠采样构成了数字信号处理领域两种基础的采样策略,它们在工程实践应用时各自展现出独特的长处与短处及适用情境。以下将深入阐释这两种采样方法的运作机制,并对它们在实际操作的区别进行细致对比。 我们首先阐释过采样的核心概念。过采样(Oversampling)一般是指运用高于必要标准频率对模拟信号实施采样。举例而言,当信号频率为70MHz且信号带宽为20MHz时,依据奈奎斯特采样准则,理论上采样频率只需略高于40MHz(即信号带宽频率的两倍)即可达成无失真采样。然而,在现实操作,系统构造者常常会采用超过140MSPS(每秒百万次采样)的采样速率,这通常超出理论所需。过采样的主要不利之处涵盖:提升ADC输出数据速率,引发FPGA的时序挑战;增大功耗、ADC及FPGA的制造成本。尽管存在这些不足,过采样依然具备其有利之处,例如可提供处理增益、频率规划的伸缩性以及能够处理更宽的信号带宽。 接下来,我们探讨欠采样的基本原理。欠采样(Undersampling)是指以低于理论标准频率对信号进行采样,这在处理高输入信号频率时尤为有效。例如,针对70MHz的频(IF)信号,通过欠采样能够采用低于40MHz的采样频率进行采样,从而将数据速率降至FPGA,减少时序挑战,节省能量消耗和成本。实现欠采样的关键设计考量在于它能够在系统设计达成所需的ADC动态性能。 欠采样的优势体现为能够简化硬件构造,比如降低对高速数据捕获的需求,并且在设计条件允许时,可选用较慢的ADC来削减成本。然而,欠采样技术也存在其局限性,例如在ADC的非理想表现可能导致非线性失真,诸如二阶(HD2)和三阶(HD3)谐...

67,535

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧