-
1. Re: WeldClientProxy and protected methods
mkouba Mar 20, 2014 11:02 AM (in response to simon.kulessa)Hi Simon,
I don't think this is a Weld issue. In your EL expression #{testBean.dataTable}, dataTable should be theoretically resolved by javax.el.BeanELResolver which only discovers public JavaBean properties. Is Weld the only component you upgraded?
-
2. Re: WeldClientProxy and protected methods
simon.kulessa Mar 20, 2014 11:44 AM (in response to mkouba)Hi Martin,
I did some other upgrades before, but after this point everything was working fine.
Then I continued with upgrading Weld and got into this problem.
-
3. Re: WeldClientProxy and protected methods
mkouba Mar 21, 2014 4:12 AM (in response to simon.kulessa)You're right. It seems all the proxy methods are public in Weld 1.1.x. I'm not sure whether it's a bug or a "feature" though. I will investigate this further.
-
4. Re: WeldClientProxy and protected methods
mkouba Mar 21, 2014 6:57 AM (in response to mkouba)1 of 1 people found this helpfulIt's likely a bug in Weld 1.1.x - I created a new issue WELD-1626. In any case, it's definitely a bad idea to allow access of protected methods via EL expressions.
-
5. Re: WeldClientProxy and protected methods
simon.kulessa Mar 24, 2014 7:16 AM (in response to mkouba)Hi Martin,
thanks for your answer.
Maybe you (someone else?) could also trigger an update of the documentation that only public methods should be used.
-
6. Re: WeldClientProxy and protected methods
mkouba Mar 24, 2014 8:08 AM (in response to simon.kulessa)Maybe you (someone else?) could also trigger an update of the documentation that only public methods should be used.
Well, the CDI programming model does not forbid protected methods (e.g. you can have a protected observer method). Of course there are some limitations for client proxies etc... However Unified EL only supports JavaBean properties out of the box (see also http://docs.oracle.com/cd/E19226-01/820-7627/bnahu/index.html). The CDI container must only provide an ELResolver that resolves bean names and returns contextual instances (bean instance). Properties are handled by standard EL resolver chain.