I've started reading the Enterprise Java Beans 3.0 book by Bill Burke and Richard Monson-Haefel and in chapter 4 it has this code
@PersistenceContext(unitName="titan") private EntityManager manager;
The class then has methods that access this field (which is never set in the constructor and has no setter method). So how does the container set this private field with an actual instance? I'm assuming there's some reflection and/or bytecode magic going on - how is that done?