Hello, I understand that in some scenarios an application developer wants to override the characteristics that are specified via annotations, but what's the reason for overriding even the type of a managed bean?
It's quite cumbersome to maintain these managed beans, as you (or at least I) normally don't know where to start looking for possible annotations. For example, think of the test cases in the shale-tiger project (I'm refering to VariableResolverImplTestCase#testBean3()). Even though TestBean3 uses the Value annotations to specify dependencies, an instance of TestBean will serve as actual injection target. In my opinion it's also quite unreasonable that following modification to TestBean3 causes an exception. /// line #223: + + @Value("arbitrary value") + private String anotherString; + + public void setAnotherString(String anotherString) { + this.anotherString = anotherString; + } + + public String getAnotherStringProperty() { + return anotherString; + } } \\\ javax.faces.el.EvaluationException: Managed bean definition bean3 specifies a managed property anotherString whose value expression arbitrary value threw an exception when evaluated at .... Well, actually the exception is reasonable, as the class TestBean has no property called "anotherString", but I guess you got the idea. Bernhard Huemer