You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2010/11/13 20:37:14 UTC
[jira] Created: (WICKET-3168) No Application in the thread when the
web server destroys WicketFilter
No Application in the thread when the web server destroys WicketFilter
----------------------------------------------------------------------
Key: WICKET-3168
URL: https://issues.apache.org/jira/browse/WICKET-3168
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.5-M3
Reporter: Martin Grigorov
Playing with Wicket 1.5 + Google AppEngine I saw this exception after modifying appengine-web.xml:
WARNING: EXCEPTION
org.apache.wicket.WicketRuntimeException: There is no application attached to current thread Timer-2
at org.apache.wicket.Application.get(Application.java:250)
at org.apache.wicket.Session.get(Session.java:154)
at org.apache.wicket.page.DefaultPageManagerContext.getSessionAttribute(DefaultPageManagerContext.java:63)
at org.apache.wicket.pageStore.memory.HttpSessionDataStore.getPageTable(HttpSessionDataStore.java:130)
at org.apache.wicket.pageStore.memory.HttpSessionDataStore.destroy(HttpSessionDataStore.java:116)
at org.apache.wicket.pageStore.DefaultPageStore.destroy(DefaultPageStore.java:66)
at org.apache.wicket.page.PersistentPageManager.destroy(PersistentPageManager.java:374)
at org.apache.wicket.page.PageManagerDecorator.destroy(PageManagerDecorator.java:86)
at org.apache.wicket.Application.internalDestroy(Application.java:839)
at org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:440)
at org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:437)
at org.mortbay.jetty.servlet.FilterHolder.destroyInstance(FilterHolder.java:127)
....
I.e. the asynchronous thread that destroys WicketFilter has no ThreadContext thread local and thus this exception.
I see two problems/solutions:
1) HttpSessionDataStore should have noop #destroy() - the Application is being destroyed, so all its http sessions will be deleted and there is no need to clean the special attribute which stores session's pages
2) WicketFilter#destroy() can set/unset the application in ThreadContext, so other functionality in all #destroy() methods will have access to the Application via Application.get()
Any objections ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (WICKET-3168) No Application in the
thread when the web server destroys WicketFilter
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931724#action_12931724 ]
Martin Grigorov edited comment on WICKET-3168 at 11/13/10 3:14 PM:
-------------------------------------------------------------------
Yes and No.
Yes - GAE runs on Jetty. I guess older than the fixed one.
No - currently WicketFilter#destroy() stack trace has no Application in the thread local, in WICKET-3011 org.apache.wicket.session.HttpSessionStore.SessionBindingListener.valueUnbound(HttpSessionBindingEvent) (i.e. Application#sessionUnbound()) will have no Application.get().
Only Application.get(String) will work because HttpSessionStore has 'applicationKey' member.
In this ticket even Application.get(String) is not available for :
getPageManager().destroy();
getSessionStore().destroy();
in Application#internalDestroy() because
applicationKeyToApplication.remove(getApplicationKey());
is called before them.
I think we should move that line at the bottom of #internalDestroy() too.
was (Author: mgrigorov):
Yes and No.
Yes - GAE runs on Jetty. I guess older than the fixed one.
No - currently WicketFilter#destroy() stack trace has no Application in the thread local, in WICKET-3011 org.apache.wicket.session.HttpSessionStore.SessionBindingListener.valueUnbound(HttpSessionBindingEvent) (i.e. Application#sessionUnbound()) will have no Application.get().
Only Application.get(String) will work because HttpSessionStore has 'applicationKey' member.
I this ticket even Application.get(String) is not available for :
getPageManager().destroy();
getSessionStore().destroy();
in Application#internalDestroy() because
applicationKeyToApplication.remove(getApplicationKey());
is called before them.
I think we should move that line at the bottom of #internalDestroy() too.
> No Application in the thread when the web server destroys WicketFilter
> ----------------------------------------------------------------------
>
> Key: WICKET-3168
> URL: https://issues.apache.org/jira/browse/WICKET-3168
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-M3
> Reporter: Martin Grigorov
>
> Playing with Wicket 1.5 + Google AppEngine I saw this exception after modifying appengine-web.xml:
> WARNING: EXCEPTION
> org.apache.wicket.WicketRuntimeException: There is no application attached to current thread Timer-2
> at org.apache.wicket.Application.get(Application.java:250)
> at org.apache.wicket.Session.get(Session.java:154)
> at org.apache.wicket.page.DefaultPageManagerContext.getSessionAttribute(DefaultPageManagerContext.java:63)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.getPageTable(HttpSessionDataStore.java:130)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.destroy(HttpSessionDataStore.java:116)
> at org.apache.wicket.pageStore.DefaultPageStore.destroy(DefaultPageStore.java:66)
> at org.apache.wicket.page.PersistentPageManager.destroy(PersistentPageManager.java:374)
> at org.apache.wicket.page.PageManagerDecorator.destroy(PageManagerDecorator.java:86)
> at org.apache.wicket.Application.internalDestroy(Application.java:839)
> at org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:440)
> at org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:437)
> at org.mortbay.jetty.servlet.FilterHolder.destroyInstance(FilterHolder.java:127)
> ....
> I.e. the asynchronous thread that destroys WicketFilter has no ThreadContext thread local and thus this exception.
> I see two problems/solutions:
> 1) HttpSessionDataStore should have noop #destroy() - the Application is being destroyed, so all its http sessions will be deleted and there is no need to clean the special attribute which stores session's pages
> 2) WicketFilter#destroy() can set/unset the application in ThreadContext, so other functionality in all #destroy() methods will have access to the Application via Application.get()
> Any objections ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (WICKET-3168) No Application in the thread when
the web server destroys WicketFilter
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov reassigned WICKET-3168:
---------------------------------------
Assignee: Martin Grigorov
> No Application in the thread when the web server destroys WicketFilter
> ----------------------------------------------------------------------
>
> Key: WICKET-3168
> URL: https://issues.apache.org/jira/browse/WICKET-3168
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-M3
> Reporter: Martin Grigorov
> Assignee: Martin Grigorov
> Attachments: WICKET-3168.patch
>
>
> Playing with Wicket 1.5 + Google AppEngine I saw this exception after modifying appengine-web.xml:
> WARNING: EXCEPTION
> org.apache.wicket.WicketRuntimeException: There is no application attached to current thread Timer-2
> at org.apache.wicket.Application.get(Application.java:250)
> at org.apache.wicket.Session.get(Session.java:154)
> at org.apache.wicket.page.DefaultPageManagerContext.getSessionAttribute(DefaultPageManagerContext.java:63)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.getPageTable(HttpSessionDataStore.java:130)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.destroy(HttpSessionDataStore.java:116)
> at org.apache.wicket.pageStore.DefaultPageStore.destroy(DefaultPageStore.java:66)
> at org.apache.wicket.page.PersistentPageManager.destroy(PersistentPageManager.java:374)
> at org.apache.wicket.page.PageManagerDecorator.destroy(PageManagerDecorator.java:86)
> at org.apache.wicket.Application.internalDestroy(Application.java:839)
> at org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:440)
> at org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:437)
> at org.mortbay.jetty.servlet.FilterHolder.destroyInstance(FilterHolder.java:127)
> ....
> I.e. the asynchronous thread that destroys WicketFilter has no ThreadContext thread local and thus this exception.
> I see two problems/solutions:
> 1) HttpSessionDataStore should have noop #destroy() - the Application is being destroyed, so all its http sessions will be deleted and there is no need to clean the special attribute which stores session's pages
> 2) WicketFilter#destroy() can set/unset the application in ThreadContext, so other functionality in all #destroy() methods will have access to the Application via Application.get()
> Any objections ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3168) No Application in the thread when
the web server destroys WicketFilter
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932359#action_12932359 ]
Igor Vaynberg commented on WICKET-3168:
---------------------------------------
if everything is being destroyed with this patch then lets commit it.
> No Application in the thread when the web server destroys WicketFilter
> ----------------------------------------------------------------------
>
> Key: WICKET-3168
> URL: https://issues.apache.org/jira/browse/WICKET-3168
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-M3
> Reporter: Martin Grigorov
> Attachments: WICKET-3168.patch
>
>
> Playing with Wicket 1.5 + Google AppEngine I saw this exception after modifying appengine-web.xml:
> WARNING: EXCEPTION
> org.apache.wicket.WicketRuntimeException: There is no application attached to current thread Timer-2
> at org.apache.wicket.Application.get(Application.java:250)
> at org.apache.wicket.Session.get(Session.java:154)
> at org.apache.wicket.page.DefaultPageManagerContext.getSessionAttribute(DefaultPageManagerContext.java:63)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.getPageTable(HttpSessionDataStore.java:130)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.destroy(HttpSessionDataStore.java:116)
> at org.apache.wicket.pageStore.DefaultPageStore.destroy(DefaultPageStore.java:66)
> at org.apache.wicket.page.PersistentPageManager.destroy(PersistentPageManager.java:374)
> at org.apache.wicket.page.PageManagerDecorator.destroy(PageManagerDecorator.java:86)
> at org.apache.wicket.Application.internalDestroy(Application.java:839)
> at org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:440)
> at org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:437)
> at org.mortbay.jetty.servlet.FilterHolder.destroyInstance(FilterHolder.java:127)
> ....
> I.e. the asynchronous thread that destroys WicketFilter has no ThreadContext thread local and thus this exception.
> I see two problems/solutions:
> 1) HttpSessionDataStore should have noop #destroy() - the Application is being destroyed, so all its http sessions will be deleted and there is no need to clean the special attribute which stores session's pages
> 2) WicketFilter#destroy() can set/unset the application in ThreadContext, so other functionality in all #destroy() methods will have access to the Application via Application.get()
> Any objections ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-3168) No Application in the thread when
the web server destroys WicketFilter
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-3168.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.5-M4
The patch is committed with r1037227
> No Application in the thread when the web server destroys WicketFilter
> ----------------------------------------------------------------------
>
> Key: WICKET-3168
> URL: https://issues.apache.org/jira/browse/WICKET-3168
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-M3
> Reporter: Martin Grigorov
> Assignee: Martin Grigorov
> Fix For: 1.5-M4
>
> Attachments: WICKET-3168.patch
>
>
> Playing with Wicket 1.5 + Google AppEngine I saw this exception after modifying appengine-web.xml:
> WARNING: EXCEPTION
> org.apache.wicket.WicketRuntimeException: There is no application attached to current thread Timer-2
> at org.apache.wicket.Application.get(Application.java:250)
> at org.apache.wicket.Session.get(Session.java:154)
> at org.apache.wicket.page.DefaultPageManagerContext.getSessionAttribute(DefaultPageManagerContext.java:63)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.getPageTable(HttpSessionDataStore.java:130)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.destroy(HttpSessionDataStore.java:116)
> at org.apache.wicket.pageStore.DefaultPageStore.destroy(DefaultPageStore.java:66)
> at org.apache.wicket.page.PersistentPageManager.destroy(PersistentPageManager.java:374)
> at org.apache.wicket.page.PageManagerDecorator.destroy(PageManagerDecorator.java:86)
> at org.apache.wicket.Application.internalDestroy(Application.java:839)
> at org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:440)
> at org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:437)
> at org.mortbay.jetty.servlet.FilterHolder.destroyInstance(FilterHolder.java:127)
> ....
> I.e. the asynchronous thread that destroys WicketFilter has no ThreadContext thread local and thus this exception.
> I see two problems/solutions:
> 1) HttpSessionDataStore should have noop #destroy() - the Application is being destroyed, so all its http sessions will be deleted and there is no need to clean the special attribute which stores session's pages
> 2) WicketFilter#destroy() can set/unset the application in ThreadContext, so other functionality in all #destroy() methods will have access to the Application via Application.get()
> Any objections ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-3168) No Application in the thread when the
web server destroys WicketFilter
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov updated WICKET-3168:
------------------------------------
Attachment: WICKET-3168.patch
This is what I mean expressed in code.
> No Application in the thread when the web server destroys WicketFilter
> ----------------------------------------------------------------------
>
> Key: WICKET-3168
> URL: https://issues.apache.org/jira/browse/WICKET-3168
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-M3
> Reporter: Martin Grigorov
> Attachments: WICKET-3168.patch
>
>
> Playing with Wicket 1.5 + Google AppEngine I saw this exception after modifying appengine-web.xml:
> WARNING: EXCEPTION
> org.apache.wicket.WicketRuntimeException: There is no application attached to current thread Timer-2
> at org.apache.wicket.Application.get(Application.java:250)
> at org.apache.wicket.Session.get(Session.java:154)
> at org.apache.wicket.page.DefaultPageManagerContext.getSessionAttribute(DefaultPageManagerContext.java:63)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.getPageTable(HttpSessionDataStore.java:130)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.destroy(HttpSessionDataStore.java:116)
> at org.apache.wicket.pageStore.DefaultPageStore.destroy(DefaultPageStore.java:66)
> at org.apache.wicket.page.PersistentPageManager.destroy(PersistentPageManager.java:374)
> at org.apache.wicket.page.PageManagerDecorator.destroy(PageManagerDecorator.java:86)
> at org.apache.wicket.Application.internalDestroy(Application.java:839)
> at org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:440)
> at org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:437)
> at org.mortbay.jetty.servlet.FilterHolder.destroyInstance(FilterHolder.java:127)
> ....
> I.e. the asynchronous thread that destroys WicketFilter has no ThreadContext thread local and thus this exception.
> I see two problems/solutions:
> 1) HttpSessionDataStore should have noop #destroy() - the Application is being destroyed, so all its http sessions will be deleted and there is no need to clean the special attribute which stores session's pages
> 2) WicketFilter#destroy() can set/unset the application in ThreadContext, so other functionality in all #destroy() methods will have access to the Application via Application.get()
> Any objections ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3168) No Application in the thread when
the web server destroys WicketFilter
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931721#action_12931721 ]
Igor Vaynberg commented on WICKET-3168:
---------------------------------------
can this be related to WICKET-3011, a bad jetty version that runs GAE?
> No Application in the thread when the web server destroys WicketFilter
> ----------------------------------------------------------------------
>
> Key: WICKET-3168
> URL: https://issues.apache.org/jira/browse/WICKET-3168
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-M3
> Reporter: Martin Grigorov
>
> Playing with Wicket 1.5 + Google AppEngine I saw this exception after modifying appengine-web.xml:
> WARNING: EXCEPTION
> org.apache.wicket.WicketRuntimeException: There is no application attached to current thread Timer-2
> at org.apache.wicket.Application.get(Application.java:250)
> at org.apache.wicket.Session.get(Session.java:154)
> at org.apache.wicket.page.DefaultPageManagerContext.getSessionAttribute(DefaultPageManagerContext.java:63)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.getPageTable(HttpSessionDataStore.java:130)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.destroy(HttpSessionDataStore.java:116)
> at org.apache.wicket.pageStore.DefaultPageStore.destroy(DefaultPageStore.java:66)
> at org.apache.wicket.page.PersistentPageManager.destroy(PersistentPageManager.java:374)
> at org.apache.wicket.page.PageManagerDecorator.destroy(PageManagerDecorator.java:86)
> at org.apache.wicket.Application.internalDestroy(Application.java:839)
> at org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:440)
> at org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:437)
> at org.mortbay.jetty.servlet.FilterHolder.destroyInstance(FilterHolder.java:127)
> ....
> I.e. the asynchronous thread that destroys WicketFilter has no ThreadContext thread local and thus this exception.
> I see two problems/solutions:
> 1) HttpSessionDataStore should have noop #destroy() - the Application is being destroyed, so all its http sessions will be deleted and there is no need to clean the special attribute which stores session's pages
> 2) WicketFilter#destroy() can set/unset the application in ThreadContext, so other functionality in all #destroy() methods will have access to the Application via Application.get()
> Any objections ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3168) No Application in the thread when
the web server destroys WicketFilter
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934154#action_12934154 ]
Hudson commented on WICKET-3168:
--------------------------------
Integrated in Apache Wicket 1.5.x #534 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/534/])
WICKET-3168 No Application in the thread when the web server destroys WicketFilter
Set the current Application in the ThreadContext local during WicketFilter#destroy() call.
This way all destroyable objects can use the application if they need it.
> No Application in the thread when the web server destroys WicketFilter
> ----------------------------------------------------------------------
>
> Key: WICKET-3168
> URL: https://issues.apache.org/jira/browse/WICKET-3168
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-M3
> Reporter: Martin Grigorov
> Assignee: Martin Grigorov
> Fix For: 1.5-M4
>
> Attachments: WICKET-3168.patch
>
>
> Playing with Wicket 1.5 + Google AppEngine I saw this exception after modifying appengine-web.xml:
> WARNING: EXCEPTION
> org.apache.wicket.WicketRuntimeException: There is no application attached to current thread Timer-2
> at org.apache.wicket.Application.get(Application.java:250)
> at org.apache.wicket.Session.get(Session.java:154)
> at org.apache.wicket.page.DefaultPageManagerContext.getSessionAttribute(DefaultPageManagerContext.java:63)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.getPageTable(HttpSessionDataStore.java:130)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.destroy(HttpSessionDataStore.java:116)
> at org.apache.wicket.pageStore.DefaultPageStore.destroy(DefaultPageStore.java:66)
> at org.apache.wicket.page.PersistentPageManager.destroy(PersistentPageManager.java:374)
> at org.apache.wicket.page.PageManagerDecorator.destroy(PageManagerDecorator.java:86)
> at org.apache.wicket.Application.internalDestroy(Application.java:839)
> at org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:440)
> at org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:437)
> at org.mortbay.jetty.servlet.FilterHolder.destroyInstance(FilterHolder.java:127)
> ....
> I.e. the asynchronous thread that destroys WicketFilter has no ThreadContext thread local and thus this exception.
> I see two problems/solutions:
> 1) HttpSessionDataStore should have noop #destroy() - the Application is being destroyed, so all its http sessions will be deleted and there is no need to clean the special attribute which stores session's pages
> 2) WicketFilter#destroy() can set/unset the application in ThreadContext, so other functionality in all #destroy() methods will have access to the Application via Application.get()
> Any objections ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3168) No Application in the thread when
the web server destroys WicketFilter
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931724#action_12931724 ]
Martin Grigorov commented on WICKET-3168:
-----------------------------------------
Yes and No.
Yes - GAE runs on Jetty. I guess older than the fixed one.
No - currently WicketFilter#destroy() stack trace has no Application in the thread local, in WICKET-3011 org.apache.wicket.session.HttpSessionStore.SessionBindingListener.valueUnbound(HttpSessionBindingEvent) (i.e. Application#sessionUnbound()) will have no Application.get().
Only Application.get(String) will work because HttpSessionStore has 'applicationKey' member.
I this ticket even Application.get(String) is not available for :
getPageManager().destroy();
getSessionStore().destroy();
in Application#internalDestroy() because
applicationKeyToApplication.remove(getApplicationKey());
is called before them.
I think we should move that line at the bottom of #internalDestroy() too.
> No Application in the thread when the web server destroys WicketFilter
> ----------------------------------------------------------------------
>
> Key: WICKET-3168
> URL: https://issues.apache.org/jira/browse/WICKET-3168
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-M3
> Reporter: Martin Grigorov
>
> Playing with Wicket 1.5 + Google AppEngine I saw this exception after modifying appengine-web.xml:
> WARNING: EXCEPTION
> org.apache.wicket.WicketRuntimeException: There is no application attached to current thread Timer-2
> at org.apache.wicket.Application.get(Application.java:250)
> at org.apache.wicket.Session.get(Session.java:154)
> at org.apache.wicket.page.DefaultPageManagerContext.getSessionAttribute(DefaultPageManagerContext.java:63)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.getPageTable(HttpSessionDataStore.java:130)
> at org.apache.wicket.pageStore.memory.HttpSessionDataStore.destroy(HttpSessionDataStore.java:116)
> at org.apache.wicket.pageStore.DefaultPageStore.destroy(DefaultPageStore.java:66)
> at org.apache.wicket.page.PersistentPageManager.destroy(PersistentPageManager.java:374)
> at org.apache.wicket.page.PageManagerDecorator.destroy(PageManagerDecorator.java:86)
> at org.apache.wicket.Application.internalDestroy(Application.java:839)
> at org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:440)
> at org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:437)
> at org.mortbay.jetty.servlet.FilterHolder.destroyInstance(FilterHolder.java:127)
> ....
> I.e. the asynchronous thread that destroys WicketFilter has no ThreadContext thread local and thus this exception.
> I see two problems/solutions:
> 1) HttpSessionDataStore should have noop #destroy() - the Application is being destroyed, so all its http sessions will be deleted and there is no need to clean the special attribute which stores session's pages
> 2) WicketFilter#destroy() can set/unset the application in ThreadContext, so other functionality in all #destroy() methods will have access to the Application via Application.get()
> Any objections ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.