On Oct 3, 2008, at 11:23 AM, Bob Lee wrote: > On Fri, Oct 3, 2008 at 8:02 AM, Brian Pontarelli > <[EMAIL PROTECTED]> wrote: > Been thinking on this stuff a bit this morning and I think I could > remove my ThreadLocals and put stuff in a Request scope for my > webapps. As long as I could figure out a way to lazy load from the > scope since I have some cases where I inject something that requires > an EntityManager (for example) before the EntityManager is setup. > > You could inject Provider<EntityManager>.
Yeah, went that route and for a number of somewhat lame reasons, that ended up failing and I had to resort to the proxy solution. I ended up having to proxy EntityManager and HttpServletRequest (sorta). Those are really the only two tricky problems I had with JCatapult. -bp --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-guice?hl=en -~----------~----~----~----~------~----~------~--~---
