HiveMind injects by interface automatically if you use its service builder (it will use setter methods of the declared interface type), in Tapestry pages you can also use the page to inject services. So you never have to use annotations.
I don't think it matters about the order of instantiation, HM should insure every service is set up with the references it needs. John ----- Original Message ----- From: "Raul Raja Martinez" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Saturday, December 03, 2005 11:46 AM Subject: Injecting registry services to POJOS > Hi, > > I have a service in my hivemodule.xml that I'd like to inject in a Pojo > that at the same time gets loaded as a an application scope object at > startup: > > <contribution configuration-id="tapestry.state.ApplicationObjects"> > <state-object name="globalMenu" scope="application"> > <create-instance class="com.estudiowebs.CMS.DAO.GlobalMenu" /> > </state-object> > </contribution> > > This is an object that I load from the database once at startup and I > need to inject my Hivetranse Hibernate3 session service into it so that > I use that service for loading the object. > Since annotations like @InjectObject are not allowed in regular POJOS > and I don't have access to the Tapestry Registry, I don't really know > what would be the best way to solve this problem > > On the other side I have in the same application a couple of servlets > that serve as XML source for a Laszlo application, and I have the same > problem. > > Any help is appreciated. > > > I'd really love to be able to @InjectObject("service....") anywhere > > > --------------------------------------------------------------------- > 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]
