[MAGNOLIA-1758] WebcontextImpl stores a non-serializable jcr session into the httpsession Created: 08/Oct/07 Updated: 23/Jan/13 Resolved: 09/Oct/07 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core |
| Affects Version/s: | 3.1 M3 |
| Fix Version/s: | 3.5 RC1 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Fabrizio Giustina | Assignee: | Fabrizio Giustina |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Template: |
|
||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||
| Description |
|
Trying to enable session replication (<distributable/> in web.xml) doesn't work since WebcontextImpl.getRepositorySession() stores the current jcr session into the httpsession. Magnolia dies at this error: |
| Comments |
| Comment by Fabrizio Giustina [ 08/Oct/07 ] |
|
Work started: at this moment every setAttribute() call with a non-serializable attribute gets logged and ignored. <distributable/> has been enabled in the sample webapp in order to properly test it. |
| Comment by Philipp Bracher [ 09/Oct/07 ] |
|
Wired this was solved by Sameer long time ago. As far I know we should store the mgnl hm in the session containing the jcr session as a transient field. I can't see how we could avoid using the http session. |
| Comment by Fabrizio Giustina [ 09/Oct/07 ] |
|
>As far I know we should store the mgnl hm in the session containing the jcr session as a transient field. WebContextImpl was also storing the plain jcr (+ the non-serializable query manager) in different attributes, not sure when/how we lost Sameer patch but this is what we had in trunk :/ |
| Comment by Fabrizio Giustina [ 09/Oct/07 ] |
|
last patch committed to svn: now WebContext/AnonymousContext don't use anymore httpsessions for storing jcr sessions and don't keep anymore a single jcr session reused by different thread. So far so good, now we should see if this could affect performance and if we can have benefits from using a pool (should be pretty easy to implement a pool for anonymous context using commons-pool, we should try it and measure the result. |
| Comment by Philipp Bracher [ 11/Oct/07 ] |
|
I think the biggest performance improvements were achieved by sharing the mgnl AccessManager. |
| Comment by Magnolia International [ 11/Oct/07 ] |
|
fixed a bug when using virtualUriMapping (ie when filter chain is reset), where the context would be released to early (MgnlContext.getInstance() would throw an exception, because it had been set to null on an earlier call) |