This content has been marked as final.
Show 4 replies
-
1. Re: programmatic lookup with dynamic producers
meetoblivion Mar 7, 2010 7:02 AM (in response to wildes)Wouldn't it be easier to do something like....
@Inject @InstanceProperty("path/to/some/file/you/want") InputStream is; @Produces @InstanceProperty("") public InputStream productInputStream(ServletContext servletContext, InjectionPoint injectionPoint) { //do your thing here }
Unless there's something I'm forgetting about InputStream and needing Instance to wrap it.
-
2. Re: programmatic lookup with dynamic producers
wildes Mar 8, 2010 12:36 PM (in response to wildes)would be if was a static dependence. how can get objects that depend from variables outside producer method and cant be provided on initialization of the bean ? I guess it is a limitation on programmatic lookup if the injectionPoint information couldn't be provided from a Instace object.
-
3. Re: programmatic lookup with dynamic producers
pmuir Mar 9, 2010 12:03 PM (in response to wildes)Try Weld 1.0.1, I did quite a few improvements to injection point metadata for instances there.
-
4. Re: programmatic lookup with dynamic producers
ashishlin Mar 10, 2010 8:37 AM (in response to wildes)It does seem to work with weld-servlet-1.0.1-Final.jar Great job weld team :)