org.apache.catalina.Manager.createEmptySession()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中org.apache.catalina.Manager.createEmptySession()方法的一些代码示例,展示了Manager.createEmptySession()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Manager.createEmptySession()方法的具体详情如下:
包路径:org.apache.catalina.Manager
类名称:Manager
方法名:createEmptySession

Manager.createEmptySession介绍

[英]Get a session from the recycled ones or create a new empty one. The PersistentManager manager does not need to create session data because it reads it from the Store.
[中]从回收的会话中获取会话或创建一个新的空会话。PersistentManager不需要创建会话数据,因为它从存储中读取会话数据。

代码示例

代码示例来源:origin: org.glassfish.main.web/web-core

result = (StandardSession) manager.createEmptySession();
result.setCreationTime(((Long) obj).longValue());
result.readRemainingObject(ois);

代码示例来源:origin: com.gopivotal.manager/common

StandardSession standardSession = (StandardSession) this.manager.createEmptySession();
standardSession.readObjectData(in);

代码示例来源:origin: pivotalsoftware/session-managers

StandardSession standardSession = (StandardSession) this.manager.createEmptySession();
standardSession.readObjectData(in);

代码示例来源:origin: tomcat/catalina-optional

(StandardSession) manager.createEmptySession();
session.readObjectData(ois);
session.setManager(manager);

代码示例来源:origin: codefollower/Tomcat-Research

(StandardSession) manager.createEmptySession();
session.readObjectData(ois);
session.setManager(manager);

代码示例来源:origin: jboss.web/jbossweb

(StandardSession) manager.createEmptySession();
session.readObjectData(ois);
session.setManager(manager);

代码示例来源:origin: org.jboss.web/jbossweb

(StandardSession) manager.createEmptySession();
session.readObjectData(ois);
session.setManager(manager);

代码示例来源:origin: tomcat/catalina-optional

_session = (StandardSession) manager.createEmptySession();
_session.readObjectData(ois);
_session.setManager(manager);

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

ObjectInputStream ois = getObjectInputStream(fis)) {
StandardSession session = (StandardSession) manager.createEmptySession();
session.readObjectData(ois);
session.setManager(manager);

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

(StandardSession) manager.createEmptySession();
session.readObjectData(ois);
session.setManager(manager);

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

(StandardSession) manager.createEmptySession();
session.readObjectData(ois);
session.setManager(manager);

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

(StandardSession) manager.createEmptySession();
session.readObjectData(ois);
session.setManager(manager);

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

(StandardSession) manager.createEmptySession();
session.readObjectData(ois);
session.setManager(manager);

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

(StandardSession) manager.createEmptySession();
session.readObjectData(ois);
session.setManager(manager);

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

ObjectInputStream ois = getObjectInputStream(fis)) {
StandardSession session = (StandardSession) manager.createEmptySession();
session.readObjectData(ois);
session.setManager(manager);

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

_session = (StandardSession) manager.createEmptySession();
_session.readObjectData(ois);
_session.setManager(manager);

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

_session = (StandardSession) manager.createEmptySession();
_session.readObjectData(ois);
_session.setManager(manager);

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

_session = (StandardSession) manager.createEmptySession();
_session.readObjectData(ois);
_session.setManager(manager);

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

_session = (StandardSession) manager.createEmptySession();
_session.readObjectData(ois);
_session.setManager(manager);

代码示例来源:origin: pivotalsoftware/session-managers

@Test
public void test() throws IOException, ClassNotFoundException {
  Session initial = this.manager.createEmptySession();
  initial.setValid(true);
  initial.getSession().setAttribute("test-key", "test-value");
  SampleSessionObject obj = new SampleSessionObject();
  obj.setSampleField("field-set");
  obj.setNonSerializableField(40L);
  initial.getSession().setAttribute("test-key-2", obj);
  Session result = this.sessionSerializationUtils.deserialize(this.sessionSerializationUtils.serialize(initial));
  assertEquals("test-value", result.getSession().getAttribute("test-key"));
  SampleSessionObject obj2 = (SampleSessionObject) result.getSession().getAttribute("test-key-2");
  assertEquals("field-set", obj2.getSampleField());
  assertNotEquals(40L, obj2.getNonSerializableField());
}

相关文章