I have a session state object which stores some info, and I'd love to
put some logic in the object, too.  However, the logic requires access
to my business service objects.  Is there any way to inject the
service objects into the session state object on every request?

Or perhaps the following is better:

if I create a logic object which requires the session state object,
and inject that logic object into every page, how would I go about
injecting the session state object into it before it gets injected
into the page, and how would I inject my service objects into it as
well.  I mostly use spring for IoC, so I don't know my way around
hivemind.

Basically, my session state object stores primary keys, and I want to
load the actual entities automatically.  So if I build
SessionObjectLoader as follows:

public class SessionObjectLoader {
   @InjectState("selectedObjects")
   public SelectedObjects getSelectedObjects();

   @InjectObject("spring: objectService")
   public ObjectService getSelectedObjectService();

   public MyEntity getEntity() {
        return
getSelectedObjectService().loadEntity(getSelectedObjects.getEntityId());
   }
}

I want those annotations to function (or have the equivalent
functionality performed by hivemind via hivemind.xml.  I don't require
annotations, as such.)

then I want hivemind to inject a new instance (i'd like to know the
syntax for both a singleton and a new instance, actually) of a
SessionObjectLoader into every page via an annotation - presumably
@InjectObject()

Thanks

--sam

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

Reply via email to