Dependencies in block

Dan Gould dlg at cs.brown.edu
Thu Nov 18 01:40:14 EST 2004


Hi,

I'm having a problem declaring dependencies in a block.

It work's just fine if I declare it in the tags (and thus the .xinfo):

/**
 * @metro.dependency
 *     type="metroprovider.TestInterface"
 *     key="testsvc"
 */

But, if I don't have it in the header comments but do have it in the
block

<component name="axisservice" class="axisservice.DefaultAxisService">

  <dependencies>
    <dependency key="testsvc" source="testservice"/>
  </dependencies>

  <!-- The configuration section is the same in either case -->
  <configuration>
    <services>
      <avalonService name="Test2" role="testsvc"/> <!-- should rename -->
    </services>
  </configuration>

</component>

<component name="testservice" class="metroprovider.Test2"/>

I get net.dpml.service.ServiceException: Unknown key: testsvc
in DefaultServiceManager.lookup()...

Anyone have any clue as to why this might happen or how to fix it?  (As
you might guess, I'm trying to let you choose services to deploy at
composition-time rather than at compile-time; eventually I'd like it to
also be possible during run-time, but I'll worrry about that later).

Thank you,
Dan



More information about the support-dpml mailing list