you add a hivemodule.xml either in
/META-INF
or in
<context>/WEB-INF/
or in
<context>/WEB-INF/<app-name>/

You use the syntax:

<?xml ...?>
<module id="moduleid" version ="1.0.0" package="package.name">
  <service-point id="ServiceId"    
    interface="interface.name.relative.to.package.or.absolute">
    <invoke-factory>

      <construct
     class="implementation.class.name.relative.to.package.or.absolute"/>

    </invoke-factory>
  </service-point>
</module>

alternativley, you can seprate service-point as an empty element, and add the invoke-factory element in an

<implementation service-id="ServiceId">
  <invoke-factory...
</implementation>

From tapestry you inject the object as

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

or
@InjectObject("service:...")
public abstract getServiceXXX();

if you need another model than the singleton, you set it on the invoke-factory element.

Cheers,
Ron


ציטוט hv @ Fashion Content:
Anyone know of a good hivemind tutorial with a tapestry perspective. The info I have found on the Hivemind site seems very confusing and quite different from Tapestry 4 config.

Just looking for how to create singleton beans for use with my tapestry pages.

Henrik



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to