结构: Simple
Abstraction: Variant
状态: Draft
被利用可能性: unkown
The application stores a non-serializable object as an HttpSession attribute, which can hurt reliability.
A J2EE application can make use of multiple JVMs in order to improve application reliability and performance. In order to make the multiple JVMs appear as a single application to the end user, the J2EE container can replicate an HttpSession object across multiple JVMs so that if one JVM becomes unavailable another can step in and take its place without disrupting the flow of the application. This is only possible if all session data is serializable, allowing the session to be duplicated between the JVMs.
cwe_Nature: ChildOf cwe_CWE_ID: 573 cwe_View_ID: 1000 cwe_Ordinal: Primary
cwe_Nature: ChildOf cwe_CWE_ID: 573 cwe_View_ID: 699 cwe_Ordinal: Primary
Language: {'cwe_Name': 'Java', 'cwe_Prevalence': 'Undetermined'}
范围 | 影响 | 注释 |
---|---|---|
Other | Quality Degradation |
策略:
In order for session replication to work, the values the application stores as attributes in the session must implement the Serializable interface.
The following class adds itself to the session, but because it is not serializable, the session can no longer be replicated.
bad Java
映射的分类名 | ImNode ID | Fit | Mapped Node Name |
---|---|---|---|
Software Fault Patterns | SFP1 | Glitch in computation |