[seam-issues] [JBoss JIRA] (SOLDER-240) ServletContextAttributeProvider uses wrong servlet ctx. attribute name to lookup the bean manager

Christian Kaltepoth (Commented) (JIRA) jira-events at lists.jboss.org
Thu Nov 24 01:11:40 EST 2011

    [ https://issues.jboss.org/browse/SOLDER-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645298#comment-12645298 ] 

Christian Kaltepoth commented on SOLDER-240:

I just created a pull request to fix this issue:


Essentially I fixed two distinct issues here:

# ServletContextAttributeProvider didn't work at all because it uses a ThreadLocale to obtain the ServletContext. But this ThreadLocale was only set once during context initialization. Therefore it never worked after application startup when the provider was used from within a request worker thread.

# Some early versions of Weld 1.1.x don't use the attribute "javax.enterprise.inject.spi.BeanManager" but the Weld-specific "org.jboss.weld.environment.servlet.javax.enterprise.inject.spi.BeanManager" to store the BeanManager in the ServletContext. I added an additional lookup to the ServletContextAttributeProvider that checks this attribute if the first lookups fails.

I hope this helps to finally resolve this issue. :)

> ServletContextAttributeProvider uses wrong servlet ctx. attribute name to lookup the bean manager
> -------------------------------------------------------------------------------------------------
>                 Key: SOLDER-240
>                 URL: https://issues.jboss.org/browse/SOLDER-240
>             Project: Seam Solder
>          Issue Type: Bug
>          Components: Servlet
>    Affects Versions: 3.0.0.Final
>         Environment: JDK6, Tomcat 6, weld-servlet 1.1.1.Final, seam-solder 3.0.0.Final, seam-servlet 3.0.0.Final
>            Reporter: Daniel Kvasnička
>            Priority: Critical
> org.jboss.seam.servlet.beanManager.ServletContextAttributeProvider uses BeanManager.class.getName() to lookup the bean manager in servlet context, but the name of the attribute used in sub-servlet3.0 containers is now org.jboss.weld.environment.servlet.Listener.BEAN_MANAGER_ATTRIBUTE_NAME -- AFAIK (see https://issues.jboss.org/browse/RESTEASY-471).

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 seam-issues mailing list