You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Peter Klotz <pe...@blue-elephant-systems.com> on 2006/04/11 11:20:04 UTC
references between beans in different lwcontainers
Hi,
normally in Spring it should be possible to refer to a bean in a property that
is defined in another spring configuration file as long as it uses the same
application context.
I tried to define the following using 2 servicemix-lwcontainer servicemix.xml files:
core-su
\-- bean A
\-- bean B
---
plus-su
\-- bean C
| property ref=A
\-- bean D
But when I try to deploy the SU plus-su I get an error that bean A cannot be
found. How is this supposed to behave in servicemix?
Otherwise, I would have to duplicate bean A in both SU, would that be a problem
if they have the same name?
BTW, I'm refering in this case to a bean (A) that is not inside the
<sm:servicemix/> JBI container in servicemix.xml.
Thanks, Peter
Re: references between beans in different lwcontainers
Posted by Guillaume Nodet <gn...@gmail.com>.
SU are completely separated. You should define you bean in each of
you SU and there should be no conflicts.
Cheers,
Guillaume Nodet
On 4/11/06, Peter Klotz <pe...@blue-elephant-systems.com> wrote:
> Hi,
>
> normally in Spring it should be possible to refer to a bean in a property that
> is defined in another spring configuration file as long as it uses the same
> application context.
>
> I tried to define the following using 2 servicemix-lwcontainer servicemix.xml files:
>
> core-su
> \-- bean A
> \-- bean B
>
> ---
>
> plus-su
> \-- bean C
> | property ref=A
> \-- bean D
>
>
> But when I try to deploy the SU plus-su I get an error that bean A cannot be
> found. How is this supposed to behave in servicemix?
>
> Otherwise, I would have to duplicate bean A in both SU, would that be a problem
> if they have the same name?
>
> BTW, I'm refering in this case to a bean (A) that is not inside the
> <sm:servicemix/> JBI container in servicemix.xml.
>
>
> Thanks, Peter
>
>