How do app servers inject into private fields?
Posted
by cibercitizen1
on Stack Overflow
See other posts from Stack Overflow
or by cibercitizen1
Published on 2010-04-05T15:40:00Z
Indexed on
2010/04/05
15:43 UTC
Read the original article
Hit count: 388
I saw this question
about how to manually inject into annotated private fields (The way is adding setters or through a constructor)
But, the point is how do an application server (like glassfish, axis2, jboss, ...) is able to inject into a final private field (without adding setters or constructors to the user class)?
Quoting the cited question:
public SomeClass {
@Inject
private SomeResource resource;
}
Do they use a customized JVM (not the standard one) that allows to access private fields?
Thanks
© Stack Overflow or respective owner