Well, I'm not sure if I want to convert my pure Spring 2.0 context files into
xbean-spring files which requires another dependency (xbean-spring.jar)
since if I choose to have these app contexts run outside of smx, I don't
really have to change a thing.  Maybe this is a bug with xbean?  I was
thinking that the <classpath>s would be looked upon first before anything
else happens (i.e. before processing <import resource...).  Is there another
way around this?

-los


moraleslos wrote:
> 
> I have multiple Spring contexts used for maintaining my service mechanisms
> and would like to know how to incorporate them into the SMX-mix of things. 
> For example, I have a JBI unit that unmarshals xml data into POJOs.  This
> flow is all defined in my servicemix.xml.  Now in my unmarshaller, I would
> like to invoke a service that will process these populated POJOs.  The
> service definitions are defined in a separate appContext.xml file.  So how
> can I inject my services into the unmarshaller which is managed by SMX? 
> 
> 
> servicemix.xml:
> --------------------
> ......
> <sm:activationSpec componentName="pojoUnmarshaller"
> service="foo:pojoUnmarshaller">
> <sm:component>
> <bean class="com.test.servicemix.integration.TestPojoUnmarshaller">
>  </bean>
>  </sm:component>
> </sm:activationSpec>          
> .....
> --------------------
> 
> 
> TestPojoUnmarshaller.java
> ------------------------------
> ...
> private ProcessPojoService service;
> 
> public void setProcessPojoService( ProcessPojoService service) {
> this.service = service;
> }
> 
> public void process(MessageExchange exchange, NormalizedMessage message) {
>    .... // do some unmarshalling
>    Pojo data = (Pojo)unmarshaller.unmarshal(inputstream);
>    service.processPojo(data);
>    ...
> }
> ---------------------------
> 
> 
> appContext.xml
> ----------------------------
> <beans 
>       xmlns="http://www.springframework.org/schema/beans";
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>     xmlns:aop="http://www.springframework.org/schema/aop";
>     xmlns:tx="http://www.springframework.org/schema/tx";
>     xsi:schemaLocation="
>        http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>        http://www.springframework.org/schema/tx
> http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
>        http://www.springframework.org/schema/aop
> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd";>
> 
> <bean id="pojoService" class="com.test.service.PojoServiceImpl"/>
> .....
> ----------------------------------
> 
> 
> Now how do I combine everything above so that I can inject my PojoService
> into the Unmarshaller (which is managed by SMX) using an external Spring
> configuration file (not part of servicemix.xml)?  Thanks in advance.
> 
> -los
> 

-- 
View this message in context: 
http://www.nabble.com/SMX-and-multiple-spring-contexts-tf2763562s12049.html#a7739693
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to