[jboss-jira] [JBoss JIRA] (AS7-3601) Component context not available on spawned threads
Stuart Douglas (JIRA)
jira-events at lists.jboss.org
Mon Jul 9 18:40:13 EDT 2012
[ https://issues.jboss.org/browse/AS7-3601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stuart Douglas closed AS7-3601.
-------------------------------
Resolution: Rejected
This behaviour is by design
> Component context not available on spawned threads
> --------------------------------------------------
>
> Key: AS7-3601
> URL: https://issues.jboss.org/browse/AS7-3601
> Project: Application Server 7
> Issue Type: Bug
> Components: Naming
> Affects Versions: 7.1.0.CR1b
> Reporter: Johannes Odland
> Assignee: John Bailey
>
> When a request is processed, the JavaNamespaceSetup pushes an InjectedEENamespaceContextSelector onto a ThreadLocalStack, making the app and component contexts available for lookups through InitialContext().lookup().
> As a result, the application and component contexts are only available on the same thread as the request, and not on threads spawned by the application itself.
> Many applications, such as Solr, spawns its own threads for doing asynchronous processing. These are not able to access the JNDI component context (java:comp/env/).
> Perhaps one should use InheritableThreadLocal to store the selector instead?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list