hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Wannheden <knut.wannhe...@gmail.com>
Subject Re: access module from service
Date Tue, 21 Jun 2005 13:43:44 GMT
Norbi,

On 6/21/05, Norbert Sándor <devlist@freemail.hu> wrote:
> Hi,
> 
> I have a hivemodule.xml which defines a service. This service requires
> several files, where the file names are file_0, file_1, file_2.
> I thought that it would be good to place these files next to the
> hivemodule.xml, so I wanted to know its location.
> 
> But if it's not possible, then I contribute the first file to the service
> using a configuration point.
> 

In this case you should try to use the HiveMind Resources. Take a look
at the description of the <resource> and <set-resource> elements of
BuilderFactory:
http://jakarta.apache.org/hivemind/hivemind/BuilderFactory.html.

This will let you do something like:

<service-point id="foo" interface="Foo">
 <invoke-factory>
  <construct class="FooImpl">
   <set-resource property="file1" path="file_1"/>
  </construct>
 </invoke-factory>
</service-point>

If you rather want to inject the files as a List (or a Map) into the
service and want other modules to be able to specify files to be part
of this collection then you should indeed use a configuration point.
Note that you also here can use HiveMind Resources. There is a
"resource" Translator for this:
http://jakarta.apache.org/hivemind/rules.html#Translators.

HTH,

--knut

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Mime
View raw message