You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Jakob Korherr (JIRA)" <ji...@apache.org> on 2010/10/22 11:12:20 UTC

[jira] Commented: (OWB-481) WebBeansConfigurationListener implementing ServletContextListener is not likely to work

    [ https://issues.apache.org/jira/browse/OWB-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923803#action_12923803 ] 

Jakob Korherr commented on OWB-481:
-----------------------------------

Note that the ServletContainerInitializer is only available for Servlet 3.0 environments, there is no such thing for Servlet 2.5. In addition you're just moving this problem from the ServletContextListener to the ServletContainerInitializer.

Furthermore I think this is not an OWB problem, but rather a user problem. If the user wants to use OWB in his ServletContextListener(s), he has to make sure that OWB will be initialized at this point of time. We do the same in MyFaces for this problem.

For the Geronimo integration I think it should be possible to call the OWB-initialization code from the Geronimo deployer before any ServletContainerInitializer or ServletContextListener is called in order to circumvent this problem.

> WebBeansConfigurationListener implementing ServletContextListener is not likely to work
> ---------------------------------------------------------------------------------------
>
>                 Key: OWB-481
>                 URL: https://issues.apache.org/jira/browse/OWB-481
>             Project: OpenWebBeans
>          Issue Type: Bug
>            Reporter: David Jencks
>            Assignee: Gurkan Erdogdu
>
> Currently WebBeansConfigurationListener implements ServletContextListener and uses the contextInitialized method to initialize OWB for the web app.  Given an application containing a ServletContextListener that is a web bean, this requires that
> 1. the OWB  WebBeansConfigurationListener ServletContextListener get installed before the app's ServletContextListeners
> 2. the OWB WebBeansConfigurationListener have it's contextInitialized called before the servlet container instantiates the apps ServletContextListeners that are web beans.
> There's no way to guarantee this will happen in a compliant servlet container.  (Neither happens in the geronimo tomcat integration; we could force the first to happen, but not the second).
> It might be possible to do the initialization in a ServletContainerInitializer since I think these get called before any application classes start getting instantiated.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.