axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barry Hathaway <>
Subject Re: Spring property injection failing in Tomcat
Date Sat, 10 Sep 2011 19:27:35 GMT
After taking Robert's suggesting of RTFM rather than just following the 
I realized the my ServiceObjectSupplier in services.xml might be 
incorrect. I changed it
and nothing changed. I am still not able to have Spring grab my 
parameter out of Tomcat's context.xml and inject it into my bean.

My services.xml is:

<service name="SadlServiceSpringInit" 
       This web service initializes Spring.
<parameter name="ServiceClass" 
<parameter name="ServiceTCCL" >composite</parameter>
<parameter name="load-on-startup" >true</parameter>
<operation name="springInit">
<service name="SadlService" scope="soapsession">
       SadlService Spring POJO Axis2 AAR deployment
<parameter name="ServiceObjectSupplier" 
<parameter name="SpringBeanName" >sadlServiceProvider</parameter>
<messageReceiver mep=""
<messageReceiver mep=""

On 9/10/2011 7:11 AM, robert lazarski wrote:
> On Fri, Sep 9, 2011 at 6:36 PM, Barry Hathaway<>  wrote:
>> I'm running Axis2 in a Tomcat container and would like to have Spring inject
>> some
>> properties specified in Tomcat's context.xml file into one of my Spring
>> beans.
>> As such, I have:
>> <beans>
>> <bean id="applicationContext"
>>   class="org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder"
>> />
>> <bean id="servletPropertyPlaceHolder"
>> class="">
>> <description>
>>             Resolves placeholders via Tomcat's context file for web app
>> </description>
>> <property name="searchContextAttributes" value="true"/>
>> </bean>
>> <bean id="sadlServiceProvider"
>> class="">
>> <property name="kbaseRoot" value="${sadlServer.kbaseRoot}" />
>> </bean>
>> </beans>
>> This is failing. It is as if the ServletContextPropertyPlaceholderConfigurer
>> bean is never getting called
>> and is falling back to the standard PropertyPlaceholderConfigurer bean. (By
>> the way, if I add the variable
>> to the Tomcat JVM options via -DsadlServer.kbaseRoot=xxx then it does work).
>> Any ideas?
>> Thanks.
>> Barry Hathaway
> I'm not sure what sadlServer.kbaseRoot is, must be a typo. But if that
> works for you, what's the problem? Are you using the axis2 spring
> guide?
> - R
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message