You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/07/25 10:29:58 UTC

[GitHub] ralf0131 edited a comment on issue #2126: Ensure compatibility for elegant shutdown under servlet container. #1998

ralf0131 edited a comment on issue #2126: Ensure compatibility for elegant shutdown under servlet container. #1998
URL: https://github.com/apache/incubator-dubbo/pull/2126#issuecomment-407643414
 
 
   @mercyblitz I think your suggestion is more elegant. I have changed my implementation based on your idea.
   
   One thing that doing in a programmatic way can't solve is the case that if user already configured ContextLoaderListener in the web.xml.
   
   I use web-fragment.xml to ensure the compatibility. The following content:
   
   ```xml
       <context-param>
           <param-name>contextInitializerClasses</param-name>
           <param-value>org.apache.dubbo.config.spring.initializer.DubboApplicationContextInitializer</param-value>
       </context-param>
   
       <listener>
           <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
       </listener>
   ```
   
   will be merged with user's web.xml whether user has specified ContextLoaderListener or not.
   
   Be aware that the current implementation will only works under a servlet 3.0+ container.
   
   If running on a servlet container that is less than 3.0, user should add the above configuration into web.xml.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org