There's a whole lot of beans and vegetables in Java, and it's beginning to confuse me some. I've read a couple of newly published books on Java EE 6, and they all say that "entity beans" has been pruned ("deprecated" would be the correct term for the newcomer not yet brainwashed by the Java framework). The author's are quick to say that they will not at all touch the subject of.. "entity beans". It has been replaced by JPA they say. Then they write a chapter or two about object relationship mapping and annotate the POJO classes with @Entity
. They also annotate fields a little bit here and there to specify the mapping configuration when defaults won't suffice.
However, usually when we annotate bean classes, we take that annotation as a type prefix. For example, the annotation @Stateful
makes the bean a stateful session bean. Doesn't that mean that the @Entity
annotation makes the bean an entity bean - the very thing deprecated they said!?