Actually forget about the hivemodule.xml markup, just include in your EngineService:

private ApplicationStateManager appStateManager;

public void setAppStateManager(ApplicationStateManager manager) {
 appStateManager = manager;
}


the ApplicationStateManager will get autowired thanks to hivemind magic via setter based Injection. You can inject any service providing a setter and declaring the service interface as a parameter.

best regards.

Raul.


Raul Raja Martinez wrote:
Hi Jean-Eric,

You may inject the ApplicationStateManager:

<yourservice ...>
<set-service property="appStateManager"
  service-id="tapestry.state.ApplicationStateManager"/>
</yourservice ...>

public class YourService {
  private ApplicationStateManager appStateManager;

  public void setAppStateManager(ApplicationStateManager manager) {
    appStateManager = manager;
  }

  ApplicationObject getSessionData() {
    return appStateMgr.get("sessionDataId");
  }
}

There is a post in this mailing list where Kent Tong mentioned the above.

best regards

Raul.

Jean-Eric Cuendet wrote:
Hi,
I have a service implementing a IEngineService declared in hivemind. I would like to access my SessionData object from this Service.
Is it possible? ow?
Thanks
-jec

---------------------------------------------------------------------
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]




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

Reply via email to