Details
Description
If the app-scope container is not serializable, then when the session-scope container is serialized by the app server (for fail-over, etc) - it attempts to serialize its parent (the app-scope container), but fails with a NotSerializableException.
Here is a patch which fixes the problem by putting a wrapper around the app-scope container. The wrapper looks up the app-scope container in the servlet context each time it is needed. Because the only state in the wrapper is the app-scope container key, it can be successfully serialized.
SessionSerializationIntegrationTestCase has a test to demonstrate the current problem and another test to demonstrate the fix.
Activity
Jörg Schaible
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Affects Version/s | 1.1 [ 10307 ] | |
| Key | PICO-230 | NANO-133 |
| Component/s | nanowar [ 10970 ] | |
| Component/s | PicoContainer (Java) [ 10191 ] | |
| Project | PicoContainer [ 10120 ] | NanoContainer [ 10121 ] |
| Affects Version/s | 1.0-beta-5 [ 11369 ] |
Mauro Talevi
made changes -
| Project | NanoContainer [ 10121 ] | NanoWar [ 11001 ] |
| Component/s | nanowar [ 10970 ] | |
| Component/s | core [ 11625 ] | |
| Affects Version/s | 1.0-beta-5 [ 11369 ] | |
| Key | NANO-133 | NANOWAR-15 |
Mauro Talevi
made changes -
| Environment | ||
| Fix Version/s | 1.0 [ 11801 ] | |
| Description |
If the app-scope container is not serializable, then when the session-scope container is serialized by the app server (for fail-over, etc) - it attempts to serialize its parent (the app-scope container), but fails with a NotSerializableException. Here is a patch which fixes the problem by putting a wrapper around the app-scope container. The wrapper looks up the app-scope container in the servlet context each time it is needed. Because the only state in the wrapper is the app-scope container key, it can be successfully serialized. SessionSerializationIntegrationTestCase has a test to demonstrate the current problem and another test to demonstrate the fix. |
If the app-scope container is not serializable, then when the session-scope container is serialized by the app server (for fail-over, etc) - it attempts to serialize its parent (the app-scope container), but fails with a NotSerializableException. Here is a patch which fixes the problem by putting a wrapper around the app-scope container. The wrapper looks up the app-scope container in the servlet context each time it is needed. Because the only state in the wrapper is the app-scope container key, it can be successfully serialized. SessionSerializationIntegrationTestCase has a test to demonstrate the current problem and another test to demonstrate the fix. |
Paul Hammant
made changes -
| Fix Version/s | 1.0 [ 11801 ] | |
| Environment | ||
| Fix Version/s | 1.1 [ 12014 ] | |
| Description |
If the app-scope container is not serializable, then when the session-scope container is serialized by the app server (for fail-over, etc) - it attempts to serialize its parent (the app-scope container), but fails with a NotSerializableException. Here is a patch which fixes the problem by putting a wrapper around the app-scope container. The wrapper looks up the app-scope container in the servlet context each time it is needed. Because the only state in the wrapper is the app-scope container key, it can be successfully serialized. SessionSerializationIntegrationTestCase has a test to demonstrate the current problem and another test to demonstrate the fix. |
If the app-scope container is not serializable, then when the session-scope container is serialized by the app server (for fail-over, etc) - it attempts to serialize its parent (the app-scope container), but fails with a NotSerializableException. Here is a patch which fixes the problem by putting a wrapper around the app-scope container. The wrapper looks up the app-scope container in the servlet context each time it is needed. Because the only state in the wrapper is the app-scope container key, it can be successfully serialized. SessionSerializationIntegrationTestCase has a test to demonstrate the current problem and another test to demonstrate the fix. |
Michael Rimov
made changes -
| Attachment | NanoWarOptionalSession.zip [ 18363 ] |