|
||||||||
|
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
||||||||
_______________________________________________ weld-issues mailing list [email protected] https://lists.jboss.org/mailman/listinfo/weld-issues

First, I don't think this hack (return "this" from a bean instance method) is quite correct. The CDI spec does not define what you obtain, i.e. it's implementation specific. It might seem obvious - you should obtain a contextual instance of a bean. However things are more complicated...
In Weld an instance of an enhanced subclass is stored in the context for a bean which has interceptors or decorators associated. It may be different for other implementations. So at least your code will not be portable.
For normal scoped beans you should always work with client proxies (see 5.4 Client proxies for more info).