frjaeger220 / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

Run code after injection #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We need to be able to run code after construction and before scoping. For
example, Struts 2 interceptors need init() called, and they need
configuration properties set.

Original issue reported on code.google.com by crazybob...@gmail.com on 14 Mar 2007 at 10:31

GoogleCodeExporter commented 9 years ago
This ties into 
http://code.google.com/p/google-guice/issues/detail?id=62&can=2&q=&sort=-id

My vote would be to go with the standard approach and allow a @PostConstruct 
annotation.

Original comment by h...@formicary.net on 14 Mar 2007 at 10:35

GoogleCodeExporter commented 9 years ago
@PostConstruct (or @PostInject :)) works for code in the class, but we should 
also
support external logic, kind of like Spring's post processors.

Original comment by crazybob...@gmail.com on 14 Mar 2007 at 10:44

GoogleCodeExporter commented 9 years ago
Sounds good to me; allowing folks to post process in other ways (e.g. to support
other kinds of annotation or APIs like Spring's InitializingBean etc).

Original comment by james.st...@gmail.com on 17 Mar 2007 at 7:31

GoogleCodeExporter commented 9 years ago
This describes Provider Interceptors, issue 78, in a nutshell.

Original comment by kevin...@gmail.com on 19 Mar 2007 at 6:32