java - Mule context having Spring application context as parent -


how can web application load mule context , have spring context parent?

i have tried following(web.xml) , did not work:

<context-param>     <param-name>org.mule.config</param-name>     <param-value>mule-config.xml</param-value> </context-param>  <listener>     <listener-class>org.mule.config.builders.mulexmlbuildercontextlistener</listener-class> </listener>   <context-param>     <param-name>contextconfiglocation</param-name>     <param-value>classpath:applicationcontext.xml</param-value> </context-param>   <listener>     <listener-class>              org.springframework.web.context.contextloaderlistener     </listener-class>  </listener>  

if switch order of listeners , following exceptions occur:

caused by: org.springframework.beans.factory.nosuchbeandefinitionexception: no qualifying bean of type [org.mule.api.serialization.objectserializer] found dependency: expected @ least 1 bean qualifies autowire candidate dependency. dependency annotations: {} @ org.springframework.beans.factory.support.defaultlistablebeanfactory.raisenosuchbeandefinitionexception(defaultlistablebeanfactory.java:1297) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.doresolvedependency(defaultlistablebeanfactory.java:1045) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.resolvedependency(defaultlistablebeanfactory.java:940) @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredmethodelement.inject(autowiredannotationbeanpostprocessor.java:606) ... 46 more 

on web.xml shown above application loads, seems there 2 separate spring contexts pointing different beans.

to working mule 2 context, need add following mule-config.xml

<spring:beans>     <spring:import resource="classpath:applicationcontext.xml" /> </spring:beans>  

please advise on how solve this? small example great demonstrates on how web app should load spring/mule context , having single spring context parent in mule.

thank you.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -