Guillaume Nodet wrote:
> Spring references only works with top-level beans.
> So you should also define your component as a reference, using
>   <sm:activationSpec component="#myComponent" .../>
> and
>   <bean id="myComponent">
>     ...
>   </>

as you see in my example I try this, sm-bean has componentName set,
I also tried all combinations of #sm-bean or sm-bean the error that
is reported is that in the "bean" bean the reference "sm-bean" or "#sm-bean"
however I try it is not found.

>>   <sm:serviceunit id="jbi">
>>     <sm:activationSpecs>
>>       <sm:activationSpec componentName="sm-bean" service="bes:sm-bean"
>> endpoint="sm-bean">
>>         <sm:component>
>>           <bean id="sm-bean" class="...">
[...]
>>           </bean>
>>         </sm:component>
>>       </sm:activationSpec>
[...]
>>     </sm:activationSpecs>
>>   </sm:serviceunit>
>>
>>   <bean id="bean" class="...">
>>     <property name="property">              <!-- this does not -->
>>       <ref local="sm-bean"/>
>>     </property>
>>   </bean>

on the SM-component both id and componentName are set but the bean outside of
the SU bean cannot access the SM-bean anyway.


Peter

Reply via email to