I mean, you can do:

<reference id="myBeanA" interface="..."/>

<bean id="myBeanB" class="...">
  <property name="beanInjectSetter" ref="myBeanA"/>
</bean>

Regards
JB

On 08/27/2013 10:36 AM, Marco Westermann wrote:
Hi JB,

thank you for your answer but I'm afraid I don't understand what you
mean. Yes I use the service and references in my bundles but I don't
understand how this helps me with my use case. It may be easier to talk
about it via IRC. ( I'm is-mw ) if you like you can ping me

regards, Marco

Am 27.08.2013 10:28, schrieb Jean-Baptiste Onofré:
Hi Marco,

did you take a look in OSGi services and references in Blueprint ?

Like this you can "inject" bean from one bundle (exposing a service)
into another bundle (referencing this service).

Regards
JB

On 08/27/2013 10:17 AM, Marco Westermann wrote:
Hi,

I have the following use case and cannot find an answer for it:

I have an osgi bundle: bundle-A
In blueprint of that bundle I define a bean:

<bean id="myBean" class="org.example.MyBean" scope="prototype">
     <property name="config" ref="${config}"/>
</bean>

Now I want to use this bean by another bundle (bundle-B) and inject it
into another bean
here is the blueprint of bundle-B

<bean id="myBean" class="org.example.MyBean"/>

as you can see, I  try to define the bean but without to define the
property config. Now the property config is null in the object. Now my
question: is there a way that the object of MyBean have the property set
which is set by bundle A but I can overwrite it by defining the property
in bundle B ?

what I want to archiv:

my bundle A should be a wrapper for soap web services and the config
property is the wsdl location. Generally I want to define the
wsdl-location by a property placeholder in bundle A but with beeing able
to overwrite the config in bundles which use that service wrapper.

Thank you and best regards,

Marco





--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to