[jboss-user] [Microcontainer] - Re: How to pick up field-level annotations in annotation plu
ALRubinger
do-not-reply at jboss.com
Wed Dec 10 13:19:00 EST 2008
"alesj" wrote : Either set bean's BeanAccessMode to FIELDS or ALL.
Great, thanks. ;)
A follow-up question:
public class Pojo
| {
| @EJB
| private Object injectedEjb;
|
| public Object getInjectedMember()
| {
| return injectedEjb;
| }
|
| }
I must use "getInjectedMember"; using "getInjectedEjb" means the field annotation is ignored. This is expected according to docs in BeanAccessMode:
STANDARD(BeanInfoCreator.STANDARD), // Getters and Setters
| FIELDS(BeanInfoCreator.FIELDS), // Getters/Setters and fields without getters and setters
| ALL(BeanInfoCreator.ALL); // As above but with non public fields included
No way to get private fields with a corresponding accessor/mutator read in? Why this design (against JavaBean conventions)?
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4195708#4195708
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4195708
More information about the jboss-user
mailing list