hi,

is it possible to easily create a contribution with services
without actually defining the service explicitly :)
I currently ended up coding something like the xml snippet
below because i want the IReference injected into
ServiceAImpl and ServiceBImpl. Is there a way of applying
Dependency Injection on object created withing <rules>?

g,
kris

   <service-point id="ref" interface="service.IReference">
       <invoke-factory>
           <construct class="service.Reference" />
       </invoke-factory>
   </service-point>

   <service-point id="service_a" interface="service.IServiceA">
       <invoke-factory>
           <construct class="service.ServiceAImpl"/>
       </invoke-factory>
   </service-point>

   <service-point id="service_b" interface="service.IServiceB">
       <invoke-factory>
           <construct class="service.ServiceBImpl"/>
       </invoke-factory>
   </service-point>

   <schema id="services">
       <element name="service" key-attribute="id">
           <attribute name="id"/>
           <attribute name="service" translator="service" />
           <rules>
               <push-attribute attribute="service" />
               <invoke-parent method="addElement" />
           </rules>
       </element>
   </schema>

<configuration-point id="serviceconfig" schema-id="services" />

<contribution configuration-id="serviceconfig">
        <service id="a" service="service_a" />
        <service id="b" service="service_b" />
</contribution>

Reply via email to