[ 
https://issues.apache.org/jira/browse/AXIS2-5467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13529018#comment-13529018
 ] 

robert lazarski commented on AXIS2-5467:
----------------------------------------

Either RequestContextListener or ContextLoaderListener should work, to fix it 
I'd need some help on your side understanding why this code in 
SpringServletContextObjectSupplier is not finding the appContext ... also 
please post the entire stacktrace and your services.xml:  

ApplicationContext aCtx =                                                       
                                                                                
    
                                          
WebApplicationContextUtils.getWebApplicationContext(servletContext);            
                                                                            
                if (aCtx == null) {                                             
                                                                                
                    
                    log.warn("Axis2 Can't find Spring's ApplicationContext");   
                                                                                
                    
                    return null;                                                
                                                                                
                    
                }

I noticed that the source of RequestContextListener itself uses 
WebApplicationContextUtils, so if your environment is not the problem I'd 
expect this code to work with RequestContextListener. 

The other possible options are (1) defining both RequestContextListener and 
ContextLoaderListener is legal in Spring, and (2) use 
SpringAppContextAwareObjectSupplier.  
                
> Extend Spring support to accept web-scoped beans
> ------------------------------------------------
>
>                 Key: AXIS2-5467
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5467
>             Project: Axis2
>          Issue Type: New Feature
>          Components: Integration
>    Affects Versions: 1.6.2
>            Reporter: Anton 
>
> Now AXIS2 offers only ContextLoaderListener as Listener for Spring 
> <listener>
>         
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> </listener>
> It's initialized during deploy of war
> For using spring web-scoped beans 
> http://static.springsource.org/spring/docs/2.5.x/reference/beans.html#beans-factory-scopes-other-web-configuration
>  axis2 must support also 
>  <listener>
>     
> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
>   </listener>
> Please, add suport or provide workaround for this issue

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to