I'm intending on refactoring a lot of the implementation of the InternalFactory stuff in order to better support proxyless circular dependencies. So if you were to prepare a patch, it might not work as desired.
What I am interested in is what the API will look like -- how do you setup the construction listeners in your module? And what does the interface for handling them look like? On Oct 2, 9:01 am, "James Strachan" <[EMAIL PROTECTED]> wrote: > Before I start rambling - has anyone attempted to patch Guice to add > this feature yet? > > Basically I thought I'd take a stab at trying to create a patch for > construction listeners. My initial idea was to add a method > postConstructionHook(InternalContext context, Object value) method to > InjectorImpl - then figure out later on how to register listeners to > the injector. > > I've not really noodled the internals much so did a bit of > IDEA-walking through the code and started down the path of adding the > hook to all invocations of the InternalFactory; which certainly > catches all the points at which an object is constructed; though you > end up with duplicate events as many of these call sites are nested. > Being a total newbie at Guice implementation code - I had a quick look > in the debugger and didn't see any obvious solution to the right call > sites to include the event notification to catch all object > constructions without duplicates - so figured I'd shoot a mail to this > list to see if I was totally off base or if there was some other > cunning way to do it (maybe at the binding layer is cleaner?). > > Any thoughts? If someone's working on it already I'll happily work on > something else :) > > -- > James > -------http://macstrac.blogspot.com/ > > Open Source Integrationhttp://open.iona.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
