Hivemind for Beginners

hivemind configuration file location

Hivemind is configured through an xml file called hivemodule.xml. Tapestry configures hivemind to look for this file in three different places. All can be used simultaniously or alternatively:

creating a service

Here is a simple example of the  hivemodule.xml .

<?xml version="1.0"?>
<module id="moduleid" version ="1.0.0" package="">
  <service-point id="ServiceId"   



alternativley, you can separate <service-point> as an empty element, and use the <invoke-factory> element in an...

<implementation service-id="ServiceId">

To use your service in tapestry components or pages you "inject" it, using the following syntax (in the .jwc or .page file)

<inject object="service:moduleid.ServiceId" property="nameOfProperty"/>

If you want to use annotations, use:

public abstract ServiceInterface getXXX();


  1. the above syntax creates a singleton service, which means, your service will be instanciated once and will be used from all threads of the application. Hivemind offers 4 instaciation models. To use them, use the model attribute of the <invoke-factory> element. See here for details.

  2. All module/services names are case sensitive.

Referencing other files from hivemodule.xml

<sub-module descriptor=""/>

Hivemind4Beginners (last edited 2009-09-20 23:20:32 by localhost)