Sorry for the delay, and thanks for the response. Given time constraints, I went with a path I knew would work: a Filter hooked in through web.xml that grabbed the ASO and put a reference to it in a static ThreadLocal in a helper class in much the same way as the Acegi HttpSessionIntegrationFilter. It works for this task but I don't like it.
Setting up the interceptor in Hivemind is ultimately where I would like to go - I don't like having two IOC containers. I wasn't up for a re-write of Spring to use Hivemind and I'm doing some fun instance-based ACL security. There is work elsewhere (search James Carman on this list - Tapestry/Acegi integration) on this front so eventually I will reach my goal. I have no problems using Spring objects and services wherever I need them, including injecting into Hivemind services. It's going the other way that confuses me. I'm not sure what I would need to do to inject the equivalent of "hivemind:someService" into a Spring bean. Thanks, Jonathan -----Original Message----- From: Henri Dupre [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 12:38 AM To: Tapestry users Subject: Re: Trying to access Tapestry ASO from Spring-configured Hibernate interceptor On 6/26/06, Jonathan Barker <[EMAIL PROTECTED]> wrote: > > I have a Tapestry4 / Tapestry4Spring / Spring / Acegi / Hibernate > application where I need to access an session-scoped Application State > Object from within a Hibernate interceptor that I am using for auditing. > > In general, I have tried to figure out how to access Hivemind-managed > objects from within Spring-managed objects. I haven't had much luck. In > this case, if I can get at the WebRequest, or HTTPServletRequest, I can > take > it from there, but again, I can't figure out how to get at those. > > To clarify a little, the ASO I need is configured in the usual Hivemind > way. > The hibernate interceptor uses a Hibernate Session configured through > Spring. > > I'm about to peruse the Acegi source because I am using the > SecurityContext > to get some of the logging information I need, so one solution lurks in > there. I'm just wondering if anyone has any creative solutions. > > Any suggestions? One trick could be to create the interceptor in hivemind... This way you can inject anything you want. Also you could use some other patterns to create a bridge between the spring and hivemind world. What is currently easy is injecting spring objects in hivemind. If you want to access your spring registry, you could always create an empty spring hivemindregistryholder bean, and inject the registry into that bean with hivemind. Thanks, Henri. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]