title: spring 3: inject a dependency from a library?
body: <p>I am developing a project and using 3rd party libraries. Let's say I use a library which gives me the object ExtObj. In my project I have a class MyObj, which uses ExtObj. How can I configure spring 3 to inject ExtObj in MyObj?</p>
  
  <p>I tried to research the topic on the internet, but I didn't find a straight answer. I would like to use xml configuration and maybe (?) <code>@Autowired</code>, not <code>@EJB</code> or <code>@Inject</code></p>
  
  <p>Thanks in advance!</p>
  
  <p>UPDATE
  my guess was:</p>
  
  <pre><code>&lt;bean id="myObj" value="me.MyObj"&gt;
    &lt;property name="extObj" value=" ... ??? ..."&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>So, I don't know what I should put into value. I guess that's where the reference to the external object goes. But spring can only reference objects that have been already defined/configured in spring. So:</p>
  
  <pre><code>&lt;bean id="extObj" value="ext.lib.ExtObj"&gt;
  &lt;bean id="myObj" value="me.MyObj"&gt;
    &lt;property name="extObj" value="extObj"&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Is that configuration right?</p>