为什么以及如何在Java Web应用程序中使用序列化? [英] Why and how is serialization used in Java web applications?

查看:135
本文介绍了为什么以及如何在Java Web应用程序中使用序列化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直致力于Java Web应用程序,其中框架坚持认为一切都是可序列化的。我假设这不是特定于框架,而是特定于Java中的Web应用程序,我的问题是:什么是框架/服务器/无论做什么都是序列化的东西?是否必须这样做?

I've been working on a Java web application where the framework insists that everything is Serializable. I assume that this isn't specific to the framework but to web applications in Java in general and my question is: what is the framework / server / whatever doing that is serializing things? Does it have to do it?

注意:我对Web应用程序或序列化了解不多。

Note: I don't know much about web applications or serialization.

推荐答案

典型的问题是,在复制或服务器关闭期间,内部HTTP会话被序列化到持久性存储,以便可以恢复或共享它们。

The typical issue is that during replication, or server shutdown, the internal HTTP Sessions are "Serialized" out to a persistent store so they can be recovered or shared.

序列化正在保存对象的状态,并且能够在以后重新构建该状态。

Serialization is saving the state of an Object, and being able to reconstitute that state at a later time.

这篇关于为什么以及如何在Java Web应用程序中使用序列化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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